Fix pages not loading at YaoiToshokan (#3877)
Fix pages not loading at YaoiToshokan
This commit is contained in:
parent
4f46c13e95
commit
31e72707bb
@ -5,7 +5,7 @@ ext {
|
|||||||
extName = 'Madara (multiple sources)'
|
extName = 'Madara (multiple sources)'
|
||||||
pkgNameSuffix = "all.madara"
|
pkgNameSuffix = "all.madara"
|
||||||
extClass = '.MadaraFactory'
|
extClass = '.MadaraFactory'
|
||||||
extVersionCode = 121
|
extVersionCode = 122
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -682,16 +682,22 @@ class TeabeerComics : Madara("Teabeer Comics", "https://teabeercomics.com", "en"
|
|||||||
|
|
||||||
class KingzManga : Madara("KingzManga", "https://kingzmanga.com", "ar")
|
class KingzManga : Madara("KingzManga", "https://kingzmanga.com", "ar")
|
||||||
|
|
||||||
class YaoiToshokan : Madara("Yaoi Toshokan", "https://www.yaoitoshokan.com.br", "pt-BR") {
|
class YaoiToshokan : Madara("Yaoi Toshokan", "https://yaoitoshokan.com.br", "pt-BR", SimpleDateFormat("dd MMM yyyy", Locale("pt", "BR"))) {
|
||||||
override val popularMangaUrlSelector = "div.post-title a:not([target])" // Page has custom link to scan website
|
// Page has custom link to scan website.
|
||||||
override fun chapterListParse(response: Response): List<SChapter> { // Chapters are listed old to new
|
override val popularMangaUrlSelector = "div.post-title a:not([target])"
|
||||||
|
|
||||||
|
// Chapters are listed old to new.
|
||||||
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
return super.chapterListParse(response).reversed()
|
return super.chapterListParse(response).reversed()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select(pageListParseSelector).mapIndexed { index, element ->
|
return document.select(pageListParseSelector)
|
||||||
Page(index, "", element.select("img").attr("data-src").trim()) // had to add trim because of white space in source
|
.mapIndexed { index, element ->
|
||||||
}
|
// Had to add trim because of white space in source.
|
||||||
|
val imageUrl = element.select("img").attr("data-src").trim()
|
||||||
|
Page(index, document.location(), imageUrl)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user