Mangago: support external chapters (#2171)
This commit is contained in:
parent
ec8c080c75
commit
57e3fdfe6a
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'Mangago'
|
||||
extClass = '.Mangago'
|
||||
extVersionCode = 13
|
||||
extVersionCode = 14
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,8 @@ class Mangago : ParsedHttpSource() {
|
|||
override fun chapterFromElement(element: Element) = SChapter.create().apply {
|
||||
val link = element.select("a.chico")
|
||||
|
||||
setUrlWithoutDomain(link.attr("href"))
|
||||
val urlOriginal = link.attr("href")
|
||||
if (urlOriginal.startsWith("http")) url = urlOriginal else setUrlWithoutDomain(urlOriginal)
|
||||
name = link.text().trim()
|
||||
date_upload = runCatching {
|
||||
dateFormat.parse(element.select("td:last-child").text().trim())?.time
|
||||
|
@ -242,6 +243,13 @@ class Mangago : ParsedHttpSource() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun pageListRequest(chapter: SChapter): Request {
|
||||
if (chapter.url.startsWith("http")) {
|
||||
return GET(chapter.url, headers)
|
||||
}
|
||||
return super.pageListRequest(chapter)
|
||||
}
|
||||
|
||||
override fun imageUrlParse(document: Document): String =
|
||||
throw UnsupportedOperationException()
|
||||
|
||||
|
|
Loading…
Reference in New Issue