This commit is contained in:
Carlos 2018-10-14 17:49:27 -04:00 committed by GitHub
parent fd65549eb3
commit dfb9bfae9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: MyReadingManga' appName = 'Tachiyomi: MyReadingManga'
pkgNameSuffix = 'all.myreadingmanga' pkgNameSuffix = 'all.myreadingmanga'
extClass = '.MyReadingMangaFactory' extClass = '.MyReadingMangaFactory'
extVersionCode = 9 extVersionCode = 10
extVersionSuffix = 8 extVersionSuffix = 9
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -75,8 +75,8 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
private fun getImage(element: Element): String { private fun getImage(element: Element): String {
return when { return when {
element.attr("data-src").endsWith(".jpg") -> element.attr("data-src") element.attr("data-src").endsWith(".jpg") || element.attr("data-src").endsWith(".png") -> element.attr("data-src")
element.attr("src").endsWith(".jpg") -> element.attr("src") element.attr("src").endsWith(".jpg") || element.attr("src").endsWith(".png") -> element.attr("src")
else -> element.attr("data-lazy-src") else -> element.attr("data-lazy-src")
} }
} }
@ -143,7 +143,13 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
override fun pageListParse(response: Response): List<Page> { override fun pageListParse(response: Response): List<Page> {
val body = response.asJsoup() val body = response.asJsoup()
val pages = mutableListOf<Page>() val pages = mutableListOf<Page>()
val elements = body.select("div.separator > img") var elements = body.select("div.separator > img")
if(elements.size == 0){
elements = body.select("div.entry-content img")
}
(0 until elements.size).mapTo(pages) { Page(it, "", getImage(elements[it])) }
(0 until elements.size).mapTo(pages) { Page(it, "", getImage(elements[it])) } (0 until elements.size).mapTo(pages) { Page(it, "", getImage(elements[it])) }