mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-25 11:42:47 +01:00
parent
5db62c7513
commit
5914fe3ea2
@ -3,7 +3,7 @@ ext {
|
||||
extClass = '.TempleScanEsp'
|
||||
themePkg = 'mangaesp'
|
||||
baseUrl = 'https://templescanesp.net'
|
||||
overrideVersionCode = 34
|
||||
overrideVersionCode = 35
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
@ -1,15 +1,31 @@
|
||||
package eu.kanade.tachiyomi.extension.es.templescanesp
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangaesp.MangaEsp
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.network.POST
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import okhttp3.FormBody
|
||||
import okhttp3.Response
|
||||
|
||||
class TempleScanEsp : MangaEsp("Temple Scan", "https://templescanesp.net", "es") {
|
||||
|
||||
// Site moved from custom theme to MangaEsp
|
||||
override val versionId = 3
|
||||
|
||||
private val readerUrl = "https://templescanesp.xyz"
|
||||
|
||||
override fun pageListRequest(chapter: SChapter) = GET(readerUrl + chapter.url, headers)
|
||||
override fun pageListParse(response: Response): List<Page> {
|
||||
var doc = response.asJsoup()
|
||||
val form = doc.selectFirst("body > form[method=post]")
|
||||
if (form != null) {
|
||||
val url = form.attr("action")
|
||||
val headers = headersBuilder().set("Referer", doc.location()).build()
|
||||
val body = FormBody.Builder()
|
||||
form.select("input").forEach {
|
||||
body.add(it.attr("name"), it.attr("value"))
|
||||
}
|
||||
doc = client.newCall(POST(url, headers, body.build())).execute().asJsoup()
|
||||
}
|
||||
return doc.select("main.contenedor.read img, main > img[src]").mapIndexed { i, element ->
|
||||
Page(i, imageUrl = element.attr("abs:src"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user