Fix chapters not opening (#8738)

This commit is contained in:
Maxim Molochkov 2021-08-22 18:36:46 +04:00 committed by GitHub
parent dd07318201
commit cc427a04a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'AllHentai'
pkgNameSuffix = 'ru.allhentai'
extClass = '.AllHentai'
extVersionCode = 8
extVersionCode = 9
libVersion = '1.2'
containsNsfw = true
}

View File

@ -229,9 +229,7 @@ class AllHentai : ParsedHttpSource() {
override fun pageListParse(response: Response): List<Page> {
val html = response.body!!.string()
val beginIndex = html.indexOf("rm_h.init( [")
val endIndex = html.indexOf(");", beginIndex)
val trimmedHtml = html.substring(beginIndex, endIndex)
val trimmedHtml = html.substringAfter("rm_h.initReader(").substringBefore(");")
val p = Pattern.compile("'.*?','.*?',\".*?\"")
val m = p.matcher(trimmedHtml)