RCO: Fail to get image links. (#8474)
* RCO: Fail to get image links. * Update regex
This commit is contained in:
parent
877ebd33c7
commit
962a22aa34
@ -1,7 +1,7 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'ReadComicOnline'
|
extName = 'ReadComicOnline'
|
||||||
extClass = '.Readcomiconline'
|
extClass = '.Readcomiconline'
|
||||||
extVersionCode = 30
|
extVersionCode = 31
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
@ -236,8 +236,8 @@ class Readcomiconline : ConfigurableSource, ParsedHttpSource() {
|
|||||||
|
|
||||||
val html = document.outerHtml()
|
val html = document.outerHtml()
|
||||||
val match = KEY_REGEX.find(html)
|
val match = KEY_REGEX.find(html)
|
||||||
val key1 = match?.groups?.get(1)?.value ?: throw Exception("Fail to get image links.")
|
val key1 = match?.groups?.get(1)?.value ?: throw Exception("Fail to get image links. Logging in via WebView may fix this issue.")
|
||||||
val key2 = match?.groups?.get(2)?.value ?: throw Exception("Fail to get image links.")
|
val key2 = match?.groups?.get(2)?.value ?: throw Exception("Fail to get image links. Logging in via WebView may fix this issue.")
|
||||||
handler.post {
|
handler.post {
|
||||||
val innerWv = WebView(Injekt.get<Application>())
|
val innerWv = WebView(Injekt.get<Application>())
|
||||||
|
|
||||||
@ -444,6 +444,6 @@ class Readcomiconline : ConfigurableSource, ParsedHttpSource() {
|
|||||||
private const val QUALITY_PREF = "qualitypref"
|
private const val QUALITY_PREF = "qualitypref"
|
||||||
private const val SERVER_PREF_TITLE = "Server Preference"
|
private const val SERVER_PREF_TITLE = "Server Preference"
|
||||||
private const val SERVER_PREF = "serverpref"
|
private const val SERVER_PREF = "serverpref"
|
||||||
private val KEY_REGEX = """\.attr\(\s*['"]src['"]\s*,\s*([\w]+)\(\s*([\w]+)\[\s*currImage""".toRegex()
|
private val KEY_REGEX = """\.attr\(\s*['"]src['"]\s*,\s*([\w]+)\(\s*([\w]+)\[\s*\w+""".toRegex()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user