parent
df5f859c1e
commit
03c18aa430
|
@ -3,7 +3,7 @@ ext {
|
||||||
extClass = '.TempleScanEsp'
|
extClass = '.TempleScanEsp'
|
||||||
themePkg = 'mangaesp'
|
themePkg = 'mangaesp'
|
||||||
baseUrl = 'https://templescanesp.net'
|
baseUrl = 'https://templescanesp.net'
|
||||||
overrideVersionCode = 34
|
overrideVersionCode = 35
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,31 @@
|
||||||
package eu.kanade.tachiyomi.extension.es.templescanesp
|
package eu.kanade.tachiyomi.extension.es.templescanesp
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.mangaesp.MangaEsp
|
import eu.kanade.tachiyomi.multisrc.mangaesp.MangaEsp
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.POST
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
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") {
|
class TempleScanEsp : MangaEsp("Temple Scan", "https://templescanesp.net", "es") {
|
||||||
|
|
||||||
// Site moved from custom theme to MangaEsp
|
// Site moved from custom theme to MangaEsp
|
||||||
override val versionId = 3
|
override val versionId = 3
|
||||||
|
|
||||||
private val readerUrl = "https://templescanesp.xyz"
|
override fun pageListParse(response: Response): List<Page> {
|
||||||
|
var doc = response.asJsoup()
|
||||||
override fun pageListRequest(chapter: SChapter) = GET(readerUrl + chapter.url, headers)
|
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