committed by
GitHub
parent
86b2ed198c
commit
3d54b44b26
@ -5,7 +5,7 @@ ext {
|
||||
extName = 'Onepace'
|
||||
pkgNameSuffix = 'all.onepace'
|
||||
extClass = '.OnepaceFactory'
|
||||
extVersionCode = 6
|
||||
extVersionCode = 7
|
||||
libVersion = '13'
|
||||
containsNsfw = false
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ import org.jsoup.nodes.Element
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.lang.Exception
|
||||
import kotlin.Exception
|
||||
|
||||
open class Onepace(override val lang: String, override val name: String) : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||
|
||||
@ -106,10 +106,15 @@ open class Onepace(override val lang: String, override val name: String) : Confi
|
||||
val jsoup = client.newCall(GET(realUrl)).execute().asJsoup()
|
||||
return jsoup.select("table.listingplikow tbody tr.filerow.even").map {
|
||||
val epName = it.select("td.cien a.name").text().replace(".mp4", "")
|
||||
val epNum = epName.substringAfter("][").substringBefore("]")
|
||||
.replace("-", ".")
|
||||
.replace(",", ".")
|
||||
.replace("F", ".").replace("B", "0").toFloat()
|
||||
val epNum = try {
|
||||
epName.substringAfter("][").substringBefore("]")
|
||||
.replace("-", ".")
|
||||
.replace(",", ".")
|
||||
.replace("F", ".").replace("B", "0").toFloat()
|
||||
} catch (e: Exception) {
|
||||
// bruh
|
||||
(Math.random() * 100).toFloat()
|
||||
}
|
||||
val epUrl = it.select("td.cien a.name").attr("href")
|
||||
SEpisode.create().apply {
|
||||
name = epName
|
||||
|
@ -5,7 +5,7 @@ ext {
|
||||
extName = 'Vostfree'
|
||||
pkgNameSuffix = 'fr.vostfree'
|
||||
extClass = '.Vostfree'
|
||||
extVersionCode = 8
|
||||
extVersionCode = 9
|
||||
libVersion = '13'
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ class Vostfree : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||
override fun episodeListParse(response: Response): List<SEpisode> {
|
||||
val episodes = mutableListOf<SEpisode>()
|
||||
val jsoup = response.asJsoup()
|
||||
jsoup.select("select.new_player_selector option").forEach { it ->
|
||||
jsoup.select("select.new_player_selector option").forEachIndexed { index, it ->
|
||||
val epNum = it.text().replace("Episode", "").drop(2)
|
||||
|
||||
if (it.text() == "Film") {
|
||||
@ -79,7 +79,7 @@ class Vostfree : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||
episode_number = epNum.toFloat()
|
||||
name = "Épisode $epNum"
|
||||
}
|
||||
episode.setUrlWithoutDomain("?episode:${epNum.toInt() - 1}/${response.request.url}")
|
||||
episode.setUrlWithoutDomain("?episode:$index/${response.request.url}")
|
||||
episodes.add(episode)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user