parent
7a09f9fc17
commit
6ca901f7e5
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Nude-Moon'
|
appName = 'Tachiyomi: Nude-Moon'
|
||||||
pkgNameSuffix = 'ru.nudemoon'
|
pkgNameSuffix = 'ru.nudemoon'
|
||||||
extClass = '.Nudemoon'
|
extClass = '.Nudemoon'
|
||||||
extVersionCode = 3
|
extVersionCode = 4
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,9 @@ import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import org.jsoup.nodes.TextNode
|
|
||||||
import java.net.URLEncoder
|
import java.net.URLEncoder
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.Locale
|
||||||
|
|
||||||
|
|
||||||
class Nudemoon : ParsedHttpSource() {
|
class Nudemoon : ParsedHttpSource() {
|
||||||
|
@ -167,20 +166,13 @@ class Nudemoon : ParsedHttpSource() {
|
||||||
return chapter
|
return chapter
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListRequest(chapter: SChapter): Request {
|
|
||||||
return GET(baseUrl + chapter.url, headers)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun pageListParse(response: Response): List<Page> {
|
override fun pageListParse(response: Response): List<Page> {
|
||||||
val document = response.asJsoup()
|
val imgScript = response.asJsoup().select("script:containsData(var images)").first().data()
|
||||||
val resPages = mutableListOf<Page>()
|
|
||||||
val imgScript = document.select("script:containsData(var images)").first().html()
|
|
||||||
|
|
||||||
Regex("images\\[(\\d+)].src\\s=\\s'.(.*)'").findAll(imgScript).forEach {
|
return Regex("""images\[(\d+)].src\s=\s'(http.*)'""").findAll(imgScript).map {
|
||||||
resPages.add(Page(it.groupValues[1].toInt(), imageUrl = baseUrl + it.groupValues[2]))
|
Page(it.groupValues[1].toInt(), imageUrl = it.groupValues[2])
|
||||||
}
|
}.toList()
|
||||||
|
|
||||||
return resPages
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = throw Exception("Not Used")
|
override fun imageUrlParse(document: Document) = throw Exception("Not Used")
|
||||||
|
|
Loading…
Reference in New Issue