MangaBox: handle URLs that don't share the same domain (closes #1726)
This commit is contained in:
parent
c1bc1bf6a9
commit
d992ba0e6f
|
@ -5,7 +5,7 @@ ext {
|
|||
appName = 'Tachiyomi: MangaBox (Mangakakalot and others)'
|
||||
pkgNameSuffix = 'all.mangabox'
|
||||
extClass = '.MangaBoxFactory'
|
||||
extVersionCode = 1
|
||||
extVersionCode = 2
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -124,6 +124,13 @@ abstract class MangaBox (
|
|||
|
||||
open val descriptionSelector = "div#noidungm"
|
||||
|
||||
override fun mangaDetailsRequest(manga: SManga): Request {
|
||||
if (manga.url.startsWith("http")) {
|
||||
return GET(manga.url, headers)
|
||||
}
|
||||
return super.mangaDetailsRequest(manga)
|
||||
}
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
val manga = SManga.create()
|
||||
val infoElement = document.select(mangaDetailsMainSelector).first()
|
||||
|
@ -146,6 +153,13 @@ abstract class MangaBox (
|
|||
else -> SManga.UNKNOWN
|
||||
}
|
||||
|
||||
override fun chapterListRequest(manga: SManga): Request {
|
||||
if (manga.url.startsWith("http")) {
|
||||
return GET(manga.url, headers)
|
||||
}
|
||||
return super.chapterListRequest(manga)
|
||||
}
|
||||
|
||||
override fun chapterListSelector() = "div.chapter-list div.row"
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter {
|
||||
|
@ -191,6 +205,13 @@ abstract class MangaBox (
|
|||
return 0L
|
||||
}
|
||||
|
||||
override fun pageListRequest(chapter: SChapter): Request {
|
||||
if (chapter.url.startsWith("http")) {
|
||||
return GET(chapter.url, headers)
|
||||
}
|
||||
return super.pageListRequest(chapter)
|
||||
}
|
||||
|
||||
open val pageListSelector = "div#vungdoc img"
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
|
|
Loading…
Reference in New Issue