chore: Sync with latest commits
This commit is contained in:
parent
9b96273df0
commit
56c945d716
115 changed files with 2230 additions and 445 deletions
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'Anime-Sama'
|
||||
extClass = '.AnimeSama'
|
||||
extVersionCode = 9
|
||||
extVersionCode = 10
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -19,6 +19,7 @@ import eu.kanade.tachiyomi.util.asJsoup
|
|||
import eu.kanade.tachiyomi.util.parallelCatchingFlatMap
|
||||
import kotlinx.serialization.encodeToString
|
||||
import kotlinx.serialization.json.Json
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import uy.kohesive.injekt.Injekt
|
||||
|
@ -64,9 +65,13 @@ class AnimeSama : ConfigurableAnimeSource, AnimeHttpSource() {
|
|||
// =============================== Latest ===============================
|
||||
override fun latestUpdatesParse(response: Response): AnimesPage {
|
||||
val animes = response.asJsoup()
|
||||
val seasons = animes.select("h2:contains(derniers ajouts) + .scrollBarStyled > div").flatMap {
|
||||
val animeUrl = it.getElementsByTag("a").attr("href")
|
||||
fetchAnimeSeasons(animeUrl)
|
||||
val seasons = animes.select("#containerAjoutsAnimes > div").flatMap {
|
||||
val animeUrl = it.getElementsByTag("a").attr("href").toHttpUrl()
|
||||
val url = animeUrl.newBuilder()
|
||||
.removePathSegment(animeUrl.pathSize - 2)
|
||||
.removePathSegment(animeUrl.pathSize - 3)
|
||||
.build()
|
||||
fetchAnimeSeasons(url.toString())
|
||||
}
|
||||
return AnimesPage(seasons, false)
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'AniSama'
|
||||
extClass = '.AniSama'
|
||||
extVersionCode = 3
|
||||
extVersionCode = 5
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
@ -13,4 +13,4 @@ dependencies {
|
|||
implementation(project(':lib:filemoon-extractor'))
|
||||
implementation(project(':lib:dood-extractor'))
|
||||
implementation(project(':lib:streamhidevid-extractor'))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class AniSama : ParsedAnimeHttpSource(), ConfigurableAnimeSource {
|
|||
|
||||
override val name = "AniSama"
|
||||
|
||||
override val baseUrl = "https://animesz.xyz"
|
||||
override val baseUrl = "https://v1.anisama.net"
|
||||
|
||||
override val lang = "fr"
|
||||
|
||||
|
@ -97,8 +97,11 @@ class AniSama : ParsedAnimeHttpSource(), ConfigurableAnimeSource {
|
|||
}
|
||||
|
||||
private fun searchAnimeByIdParse(response: Response): AnimesPage {
|
||||
val details = animeDetailsParse(response.asJsoup())
|
||||
.apply { setUrlWithoutDomain(response.request.url.toString()) }
|
||||
val details = animeDetailsParse(response.asJsoup()).apply {
|
||||
setUrlWithoutDomain(response.request.url.toString())
|
||||
initialized = true
|
||||
}
|
||||
|
||||
return AnimesPage(listOf(details), false)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'NekoSama'
|
||||
extClass = '.NekoSama'
|
||||
extVersionCode = 11
|
||||
extVersionCode = 10
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue