From 32cccd728aef9ee4e8fa09afc20528d2cda518ea Mon Sep 17 00:00:00 2001 From: Dark25 Date: Fri, 13 Sep 2024 01:05:58 +0200 Subject: [PATCH] feat(src/es): Implementation universal extractor in extensions Part 1 --- src/es/animefenix/build.gradle | 3 +- .../es/animefenix/Animefenix.kt | 5 + src/es/animeid/build.gradle | 3 +- .../animeextension/es/animeid/AnimeID.kt | 11 +- src/es/animemovil/build.gradle | 3 +- .../es/animemovil/AnimeMovil.kt | 91 ++++---- src/es/animenix/build.gradle | 3 +- .../animeextension/es/animenix/Animenix.kt | 4 +- src/es/animeonlineninja/build.gradle | 3 +- .../es/animeonlineninja/AnimeOnlineNinja.kt | 6 +- src/es/animeytes/build.gradle | 3 +- .../animeextension/es/animeytes/AnimeYTES.kt | 4 +- src/es/cine24h/build.gradle | 3 +- .../animeextension/es/cine24h/Cine24h.kt | 4 +- src/es/cinecalidad/build.gradle | 4 +- .../es/cinecalidad/CineCalidad.kt | 5 +- src/es/cineplus123/build.gradle | 3 +- .../es/cineplus123/Cineplus123.kt | 6 +- src/es/cuevana/build.gradle | 3 +- .../animeextension/es/cuevana/CuevanaCh.kt | 198 ++++++++++-------- .../animeextension/es/cuevana/CuevanaEu.kt | 68 +++--- src/es/jkanime/build.gradle | 3 +- .../animeextension/es/jkanime/Jkanime.kt | 4 +- 23 files changed, 259 insertions(+), 181 deletions(-) diff --git a/src/es/animefenix/build.gradle b/src/es/animefenix/build.gradle index c38cb4851c..4754a67097 100644 --- a/src/es/animefenix/build.gradle +++ b/src/es/animefenix/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Animefenix' extClass = '.Animefenix' - extVersionCode = 46 + extVersionCode = 47 } apply from: "$rootDir/common.gradle" @@ -21,4 +21,5 @@ dependencies { implementation(project(':lib:dood-extractor')) implementation(project(':lib:upstream-extractor')) implementation(project(':lib:streamhidevid-extractor')) + implementation(project(':lib:universal-extractor')) } diff --git a/src/es/animefenix/src/eu/kanade/tachiyomi/animeextension/es/animefenix/Animefenix.kt b/src/es/animefenix/src/eu/kanade/tachiyomi/animeextension/es/animefenix/Animefenix.kt index efa340923a..b583bbca58 100644 --- a/src/es/animefenix/src/eu/kanade/tachiyomi/animeextension/es/animefenix/Animefenix.kt +++ b/src/es/animefenix/src/eu/kanade/tachiyomi/animeextension/es/animefenix/Animefenix.kt @@ -22,6 +22,7 @@ import eu.kanade.tachiyomi.lib.streamhidevidextractor.StreamHideVidExtractor import eu.kanade.tachiyomi.lib.streamlareextractor.StreamlareExtractor import eu.kanade.tachiyomi.lib.streamtapeextractor.StreamTapeExtractor import eu.kanade.tachiyomi.lib.streamwishextractor.StreamWishExtractor +import eu.kanade.tachiyomi.lib.universalextractor.UniversalExtractor import eu.kanade.tachiyomi.lib.upstreamextractor.UpstreamExtractor import eu.kanade.tachiyomi.lib.uqloadextractor.UqloadExtractor import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor @@ -232,6 +233,10 @@ class Animefenix : ConfigurableAnimeSource, AnimeHttpSource() { StreamWishExtractor(client, headers).videosFromUrl(url, videoNameGen = { "FileLions:$it" }).also(videoList::addAll) } } catch (_: Exception) { } + + if (videoList.isEmpty()) { + UniversalExtractor(client).videosFromUrl(url, headers).let { videoList.addAll(it) } + } return videoList } diff --git a/src/es/animeid/build.gradle b/src/es/animeid/build.gradle index 18ca138c58..a6f89e468c 100644 --- a/src/es/animeid/build.gradle +++ b/src/es/animeid/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'AnimeID' extClass = '.AnimeID' - extVersionCode = 11 + extVersionCode = 12 } apply from: "$rootDir/common.gradle" @@ -9,4 +9,5 @@ apply from: "$rootDir/common.gradle" dependencies { implementation(project(':lib:streamtape-extractor')) implementation(project(':lib:streamwish-extractor')) + implementation(project(':lib:universal-extractor')) } diff --git a/src/es/animeid/src/eu/kanade/tachiyomi/animeextension/es/animeid/AnimeID.kt b/src/es/animeid/src/eu/kanade/tachiyomi/animeextension/es/animeid/AnimeID.kt index 13be7d7394..ea4a9080e0 100644 --- a/src/es/animeid/src/eu/kanade/tachiyomi/animeextension/es/animeid/AnimeID.kt +++ b/src/es/animeid/src/eu/kanade/tachiyomi/animeextension/es/animeid/AnimeID.kt @@ -13,6 +13,7 @@ import eu.kanade.tachiyomi.animesource.model.Video import eu.kanade.tachiyomi.animesource.online.ParsedAnimeHttpSource import eu.kanade.tachiyomi.lib.streamtapeextractor.StreamTapeExtractor import eu.kanade.tachiyomi.lib.streamwishextractor.StreamWishExtractor +import eu.kanade.tachiyomi.lib.universalextractor.UniversalExtractor import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.util.asJsoup import kotlinx.serialization.json.Json @@ -120,6 +121,7 @@ class AnimeID : ConfigurableAnimeSource, ParsedAnimeHttpSource() { // ============================ Video Links ============================= private val streamwishExtractor by lazy { StreamWishExtractor(client, headers) } private val streamtapeExtractor by lazy { StreamTapeExtractor(client) } + private val universalExtractor by lazy { UniversalExtractor(client) } override fun videoListParse(response: Response): List