parent
2bf823b012
commit
7203688476
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: RawLH'
|
appName = 'Tachiyomi: RawLH'
|
||||||
pkgNameSuffix = 'ja.rawlh'
|
pkgNameSuffix = 'ja.rawlh'
|
||||||
extClass = '.Rawlh'
|
extClass = '.Rawlh'
|
||||||
extVersionCode = 9
|
extVersionCode = 10
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
import android.util.Base64
|
||||||
|
|
||||||
class Rawlh : ParsedHttpSource() {
|
class Rawlh : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -149,10 +150,16 @@ class Rawlh : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
|
val key = document.select("script:containsData(atob)").html().
|
||||||
|
substringAfter("var imgSrc = $(this).attr('").substringBefore("');")
|
||||||
val pages = mutableListOf<Page>()
|
val pages = mutableListOf<Page>()
|
||||||
document.select("img.chapter-img").forEach {
|
document.select("img.chapter-img").forEach {
|
||||||
|
val encodedUrl = it.attr(key)
|
||||||
|
if (encodedUrl != "") {
|
||||||
|
val decodedUrl = Base64.decode(encodedUrl,Base64.DEFAULT)
|
||||||
|
pages.add(Page(pages.size, "", String(decodedUrl)))
|
||||||
|
}else{
|
||||||
val url = it.attr("src")
|
val url = it.attr("src")
|
||||||
if (url != "") {
|
|
||||||
pages.add(Page(pages.size, "", url))
|
pages.add(Page(pages.size, "", url))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue