forked from AlmightyHak/extensions-source
commit
404a734a4e
3 changed files with 8 additions and 10 deletions
|
@ -40,7 +40,7 @@ class AniSama : ParsedAnimeHttpSource(), ConfigurableAnimeSource {
|
|||
|
||||
override val name = "AniSama"
|
||||
|
||||
override val baseUrl = "https://fr.anisama.net"
|
||||
override val baseUrl = "https://animesz.xyz"
|
||||
|
||||
override val lang = "fr"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'NekoSama'
|
||||
extClass = '.NekoSama'
|
||||
extVersionCode = 10
|
||||
extVersionCode = 11
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -68,18 +68,16 @@ class NekoSama : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||
|
||||
override fun episodeListParse(response: Response): List<SEpisode> {
|
||||
val pageBody = response.asJsoup()
|
||||
val episodesJson = pageBody.selectFirst("script:containsData(var episodes =)")!!.data()
|
||||
.substringAfter("var episodes = ").substringBefore(";")
|
||||
val json = json.decodeFromString<List<EpisodesJson>>(episodesJson)
|
||||
val episodes = pageBody.select(".episodes a")
|
||||
|
||||
return json.map {
|
||||
return episodes.map {
|
||||
SEpisode.create().apply {
|
||||
name = try { it.episode!! } catch (e: Exception) { "episode" }
|
||||
url = it.url!!.replace("\\", "")
|
||||
name = "Episode " + it.text().substringAfter("-").substringBefore("-").trim()
|
||||
setUrlWithoutDomain(it.attr("href"))
|
||||
|
||||
episode_number = try { it.episode!!.substringAfter(". ").toFloat() } catch (e: Exception) { (0..10).random() }.toFloat()
|
||||
episode_number = it.text().substringAfterLast("-").toFloat()
|
||||
}
|
||||
}.reversed()
|
||||
}
|
||||
}
|
||||
|
||||
override fun episodeListSelector() = throw UnsupportedOperationException()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue