Merge branch 'LagradOst:master' into master

This commit is contained in:
Sarang S 2021-09-30 22:51:09 +05:30 committed by GitHub
commit 1ad326e91a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -143,7 +143,8 @@ class TenshiProvider : MainAPI() {
}
@SuppressLint("SimpleDateFormat")
private fun dateParser(dateString: String): String? {
private fun dateParser(dateString: String?): String? {
if(dateString == null) return null
try {
val format = SimpleDateFormat("dd 'of' MMM',' yyyy")
val newFormat = SimpleDateFormat("dd-MM-yyyy")
@ -242,7 +243,7 @@ class TenshiProvider : MainAPI() {
it.attr("href"),
it.selectFirst(".episode-title")?.text()?.trim(),
it.selectFirst("img")?.attr("src"),
dateParser(it.selectFirst(".episode-date").text().trim()),
dateParser(it?.selectFirst(".episode-date")?.text()?.trim()),
null,
it.attr("data-content").trim(),
)