mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 11:17:25 +01:00
Fix issues with Batoto; some links now use https rather than http, so parsing was affected. (#873)
This commit is contained in:
parent
74a7e2a17e
commit
505e642691
@ -28,7 +28,7 @@ class Batoto : ParsedHttpSource(), LoginSource {
|
|||||||
|
|
||||||
override val name = "Batoto"
|
override val name = "Batoto"
|
||||||
|
|
||||||
override val baseUrl = "http://bato.to"
|
override val baseUrl = "https://bato.to"
|
||||||
|
|
||||||
override val lang = "en"
|
override val lang = "en"
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ class Batoto : ParsedHttpSource(), LoginSource {
|
|||||||
.add("Cookie", "lang_option=English")
|
.add("Cookie", "lang_option=English")
|
||||||
|
|
||||||
private val pageHeaders = super.headersBuilder()
|
private val pageHeaders = super.headersBuilder()
|
||||||
.add("Referer", "http://bato.to/reader")
|
.add("Referer", "$baseUrl/reader")
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
@ -69,7 +69,7 @@ class Batoto : ParsedHttpSource(), LoginSource {
|
|||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga {
|
override fun popularMangaFromElement(element: Element): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
element.select("a[href^=http://bato.to]").first().let {
|
element.select("a[href^=$baseUrl]").first().let {
|
||||||
manga.setUrlWithoutDomain(it.attr("href"))
|
manga.setUrlWithoutDomain(it.attr("href"))
|
||||||
manga.title = it.text().trim()
|
manga.title = it.text().trim()
|
||||||
}
|
}
|
||||||
@ -177,7 +177,7 @@ class Batoto : ParsedHttpSource(), LoginSource {
|
|||||||
override fun chapterListSelector() = "tr.row.lang_English.chapter_row"
|
override fun chapterListSelector() = "tr.row.lang_English.chapter_row"
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
val urlElement = element.select("a[href^=http://bato.to/reader").first()
|
val urlElement = element.select("a[href^=$baseUrl/reader").first()
|
||||||
|
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
chapter.setUrlWithoutDomain(urlElement.attr("href"))
|
chapter.setUrlWithoutDomain(urlElement.attr("href"))
|
||||||
|
Loading…
Reference in New Issue
Block a user