Merged with dark25 (#636)

* merge

merged lib, lib-multisrc, all, ar, de, en, es, fr, hi, id, it, pt, tr src from dark25

* patch
This commit is contained in:
Hak 2025-02-10 15:41:59 +07:00 committed by GitHub
parent 9f385108fc
commit 1384df62f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
350 changed files with 12176 additions and 1064 deletions

View file

@ -1,7 +1,7 @@
ext {
extName = 'Anime Saturn'
extClass = '.AnimeSaturn'
extVersionCode = 9
extVersionCode = 10
}
apply from: "$rootDir/common.gradle"

View file

@ -25,7 +25,12 @@ class AnimeSaturn : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
override val name = "AnimeSaturn"
override val baseUrl by lazy { preferences.getString("preferred_domain", "https://anisaturn.com")!! }
override val baseUrl by lazy {
preferences.getString(
"preferred_domain",
"https://anisaturn.com",
)!!
}
private fun isNewDomain(): Boolean = baseUrl == "https://anisaturn.com"
@ -39,7 +44,8 @@ class AnimeSaturn : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
override fun popularAnimeSelector(): String = "div.sebox"
override fun popularAnimeRequest(page: Int): Request = GET(if (isNewDomain()) "$baseUrl/ongoing?page=$page" else "$baseUrl/animeincorso?page=$page")
override fun popularAnimeRequest(page: Int): Request =
GET(if (isNewDomain()) "$baseUrl/ongoing?page=$page" else "$baseUrl/animeincorso?page=$page")
private fun formatTitle(titlestring: String): String = titlestring.replace("(ITA) ITA", "Dub ITA").replace("(ITA)", "Dub ITA").replace("Sub ITA", "")
@ -48,9 +54,13 @@ class AnimeSaturn : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
anime.setUrlWithoutDomain(element.selectFirst("div.msebox div.headsebox div.tisebox h2 a")!!.attr("href"))
anime.title = formatTitle(element.selectFirst("div.msebox div.headsebox div.tisebox h2 a")!!.text())
if (isNewDomain()) {
anime.thumbnail_url = element.selectFirst("div.msebox div.bigsebox div.l a img.image-animation")!!.attr("src")
anime.thumbnail_url =
element.selectFirst("div.msebox div.bigsebox div.l a img.image-animation")!!
.attr("src")
} else
anime.thumbnail_url = element.selectFirst("div.msebox div.bigsebox div.l img.attachment-post-thumbnail.size-post-thumbnail.wp-post-image")!!.attr("src")
anime.thumbnail_url =
element.selectFirst("div.msebox div.bigsebox div.l img.attachment-post-thumbnail.size-post-thumbnail.wp-post-image")!!
.attr("src")
return anime
}
@ -158,11 +168,23 @@ class AnimeSaturn : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
} else {
// word search
if (isNewDomain()) {
anime.setUrlWithoutDomain(element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.text-left.badge-purple")!!.attr("href"))
anime.title = formatTitle(element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.text-left.badge-purple")!!.text())
anime.setUrlWithoutDomain(
element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.text-left.badge-purple")!!
.attr("href"),
)
anime.title = formatTitle(
element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.text-left.badge-purple")!!
.text(),
)
} else {
anime.setUrlWithoutDomain(element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.badge-light")!!.attr("href"))
anime.title = formatTitle(element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.badge-light")!!.text())
anime.setUrlWithoutDomain(
element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.badge-light")!!
.attr("href"),
)
anime.title = formatTitle(
element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.badge-light")!!
.text(),
)
}
anime.thumbnail_url = element.select("li.list-group-item.bg-dark-as-box-shadow div.item-archivio a.thumb.image-wrapper img.rounded.locandina-archivio").attr("src")
}
@ -219,9 +241,11 @@ class AnimeSaturn : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
}
description2 == null -> {
anime.description = description1
} description1.length > description2.length -> {
}
description1.length > description2.length -> {
anime.description = description1
} else -> {
}
else -> {
anime.description = description2
}
}

View file

@ -1,7 +1,7 @@
ext {
extName = 'ANIMEWORLD.tv'
extClass = '.ANIMEWORLD'
extVersionCode = 44
extVersionCode = 45
}
apply from: "$rootDir/common.gradle"
@ -12,4 +12,4 @@ dependencies {
implementation(project(':lib:streamhidevid-extractor'))
implementation(project(':lib:vidguard-extractor'))
implementation(libs.jsunpacker)
}
}

View file

@ -27,7 +27,6 @@ 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
class ANIMEWORLD : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
@ -149,7 +148,7 @@ class ANIMEWORLD : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
?.let(::listOf)
}
url.contains("streamhide") -> {
StreamHideVidExtractor(client).videosFromUrl(url)
StreamHideVidExtractor(client, headers).videosFromUrl(url)
}
url.contains("vidguard") or url.contains("listeamed") -> {
VidGuardExtractor(client).videosFromUrl(url)

View file

@ -26,7 +26,8 @@ class ShittyRedirectionInterceptor(private val client: OkHttpClient) : Intercept
}
private fun loadCookies(request: Request, response: Response): Request {
val (cookieString) = """document\.cookie="([^"]+)""".toRegex().find(response.body.string())!!.destructured
val (cookieString) = """document\.cookie="([^"]+)""".toRegex()
.find(response.body.string())!!.destructured
val cookie = Cookie.parse(request.url, cookieString)!!
client.cookieJar.saveFromResponse(request.url, listOf(cookie))