parent
8eaf5a7e80
commit
de1d2a0052
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
|
@ -21,10 +21,10 @@ open class Mangahub : ParsedHttpSource() {
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request =
|
override fun popularMangaRequest(page: Int): Request =
|
||||||
GET("$baseUrl/explore?search%5Bsort%5D=rating&search%5BdateStart%5D%5Bleft_number%5D=1972&search%5BdateStart%5D%5Bright_number%5D=2018&page=${page + 1}", headers)
|
GET("$baseUrl/explore?search[sort]=rating&search[dateStart][left_number]=1972&search[dateStart][right_number]=2018&page=${page + 1}", headers)
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request =
|
override fun latestUpdatesRequest(page: Int): Request =
|
||||||
GET("$baseUrl/explore?search%5Bsort%5D=update&search%5BdateStart%5D%5Bleft_number%5D=1972&search%5BdateStart%5D%5Bright_number%5D=2018&page=${page + 1}", headers)
|
GET("$baseUrl/explore?search[sort]=update&search[dateStart][left_number]=1972&search[dateStart][right_number]=2018&page=${page + 1}", headers)
|
||||||
|
|
||||||
override fun popularMangaSelector() = "div.list-element"
|
override fun popularMangaSelector() = "div.list-element"
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ open class Mangahub : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.author = if(document.select("[itemprop=\"author\"]") != null) document.select("[itemprop=\"author\"]").text()
|
manga.author = document.select("[itemprop=\"author\"]")?.text()
|
||||||
manga.genre = document.select("div.b-dtl-desc__labels")[0].text().replace(" ", ", ")
|
manga.genre = document.select("div.b-dtl-desc__labels")[0].text().replace(" ", ", ")
|
||||||
manga.description = if (document.select("div.b-dtl-desc__desc-info > p").last() != null) document.select("div.b-dtl-desc__desc-info > p").last().text() else null
|
manga.description = if (document.select("div.b-dtl-desc__desc-info > p").last() != null) document.select("div.b-dtl-desc__desc-info > p").last().text() else null
|
||||||
manga.status = parseStatus(document)
|
manga.status = parseStatus(document)
|
||||||
|
@ -102,10 +102,8 @@ open class Mangahub : ParsedHttpSource() {
|
||||||
val pictures = document.select("div.b-reader.b-reader__full").attr("data-js-scans").replace(""", "\"").replace("\\/", "/")
|
val pictures = document.select("div.b-reader.b-reader__full").attr("data-js-scans").replace(""", "\"").replace("\\/", "/")
|
||||||
val r = Regex("""\/\/([\w\.\/])+""")
|
val r = Regex("""\/\/([\w\.\/])+""")
|
||||||
val pages = mutableListOf<Page>()
|
val pages = mutableListOf<Page>()
|
||||||
var index = 0
|
for((index, value) in r.findAll(pictures).withIndex()) {
|
||||||
r.findAll(pictures).forEach {
|
pages.add(Page(index=index, imageUrl="http:${value.value}"))
|
||||||
pages.add(Page(index=index, imageUrl="http:${it.value}"))
|
|
||||||
index++
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return pages
|
return pages
|
||||||
|
|
Loading…
Reference in New Issue