fix zeroscans (#554)
This commit is contained in:
parent
5e861d3c4f
commit
fd65549eb3
|
@ -5,8 +5,8 @@ ext {
|
|||
appName = 'Tachiyomi: WPManga (Many sources)'
|
||||
pkgNameSuffix = 'all.wpmanga'
|
||||
extClass = '.WpMangaFactory'
|
||||
extVersionCode = 2
|
||||
extVersionSuffix = 2
|
||||
extVersionCode = 3
|
||||
extVersionSuffix = 3
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -97,12 +97,20 @@ open class WpManga(override val name: String, override val baseUrl: String, over
|
|||
val urlElement = element.select("a").first()
|
||||
val dateElement = element.select("span").first()
|
||||
val chapter = SChapter.create()
|
||||
chapter.setUrlWithoutDomain(urlElement.attr("href") + "?style=list")
|
||||
chapter.setUrlWithoutDomain(getUrl(urlElement))
|
||||
chapter.name = urlElement.text()
|
||||
chapter.date_upload = dateElement.text()?.let { parseChapterDate(it) } ?: 0
|
||||
return chapter
|
||||
}
|
||||
|
||||
private fun getUrl(urlElement: Element): String {
|
||||
var url = urlElement.attr("href")
|
||||
return when {
|
||||
url.endsWith("?style=list") -> url
|
||||
else -> "$url?style=list"
|
||||
}
|
||||
}
|
||||
|
||||
open fun parseChapterDate(date: String): Long? {
|
||||
val lcDate = date.toLowerCase()
|
||||
if (lcDate.endsWith(" ago"))
|
||||
|
@ -165,7 +173,7 @@ open class WpManga(override val name: String, override val baseUrl: String, over
|
|||
}
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
val doc = document.select("div.page-break img");
|
||||
val doc = document.select("div.page-break img")
|
||||
|
||||
val pages = mutableListOf<Page>()
|
||||
doc.forEach {
|
||||
|
|
Loading…
Reference in New Issue