chore: Sync with latest commits

This commit is contained in:
WebDitto 2024-06-23 11:00:51 -03:00
parent 9b96273df0
commit 56c945d716
115 changed files with 2230 additions and 445 deletions

View file

@ -1,7 +1,7 @@
ext {
extName = 'NekoSama'
extClass = '.NekoSama'
extVersionCode = 11
extVersionCode = 10
isNsfw = true
}

View file

@ -68,16 +68,18 @@ class NekoSama : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
override fun episodeListParse(response: Response): List<SEpisode> {
val pageBody = response.asJsoup()
val episodes = pageBody.select(".episodes a")
val episodesJson = pageBody.selectFirst("script:containsData(var episodes =)")!!.data()
.substringAfter("var episodes = ").substringBefore(";")
val json = json.decodeFromString<List<EpisodesJson>>(episodesJson)
return episodes.map {
return json.map {
SEpisode.create().apply {
name = "Episode " + it.text().substringAfter("-").substringBefore("-").trim()
setUrlWithoutDomain(it.attr("href"))
name = try { it.episode!! } catch (e: Exception) { "episode" }
url = it.url!!.replace("\\", "")
episode_number = it.text().substringAfterLast("-").toFloat()
episode_number = try { it.episode!!.substringAfter(". ").toFloat() } catch (e: Exception) { (0..10).random() }.toFloat()
}
}
}.reversed()
}
override fun episodeListSelector() = throw UnsupportedOperationException()