Skip to content

Commit

Permalink
Merge pull request #84 from Dark25/update-es-2
Browse files Browse the repository at this point in the history
feat(src/es): Implementation universal extractor in extensions Part 2
  • Loading branch information
Dark25 authored Sep 15, 2024
2 parents 4e9277c + 64fb4e3 commit c3679be
Show file tree
Hide file tree
Showing 23 changed files with 62 additions and 24 deletions.
3 changes: 2 additions & 1 deletion src/es/doramasyt/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Doramasyt'
extClass = '.Doramasyt'
extVersionCode = 15
extVersionCode = 16
}

apply from: "$rootDir/common.gradle"
Expand All @@ -15,4 +15,5 @@ dependencies {
implementation(project(':lib:streamwish-extractor'))
implementation(project(':lib:dood-extractor'))
implementation(project(':lib:mixdrop-extractor'))
implementation(project(':lib:universal-extractor'))
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import eu.kanade.tachiyomi.lib.mixdropextractor.MixDropExtractor
import eu.kanade.tachiyomi.lib.okruextractor.OkruExtractor
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.uqloadextractor.UqloadExtractor
import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor
import eu.kanade.tachiyomi.network.GET
Expand Down Expand Up @@ -190,6 +191,7 @@ class Doramasyt : ConfigurableAnimeSource, AnimeHttpSource() {
private val streamTapeExtractor by lazy { StreamTapeExtractor(client) }
private val uqloadExtractor by lazy { UqloadExtractor(client) }
private val okruExtractor by lazy { OkruExtractor(client) }
private val universalExtractor by lazy { UniversalExtractor(client) }

private fun serverVideoResolver(url: String): List<Video> {
val embedUrl = url.lowercase()
Expand All @@ -203,7 +205,7 @@ class Doramasyt : ConfigurableAnimeSource, AnimeHttpSource() {
embedUrl.contains("doodstream") || embedUrl.contains("dood.") || embedUrl.contains("ds2play") || embedUrl.contains("doods.") -> doodExtractor.videosFromUrl(url)
embedUrl.contains("filelions") || embedUrl.contains("lion") -> streamwishExtractor.videosFromUrl(url, videoNameGen = { "FileLions:$it" })
embedUrl.contains("mix") -> mixdropExtractor.videosFromUrl(url)
else -> emptyList()
else -> universalExtractor.videosFromUrl(url, headers)
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/es/hackstore/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Hackstore'
extClass = '.Hackstore'
extVersionCode = 21
extVersionCode = 22
}

apply from: "$rootDir/common.gradle"
Expand All @@ -14,4 +14,5 @@ dependencies {
implementation(project(':lib:dood-extractor'))
implementation(project(':lib:vidhide-extractor'))
implementation(project(':lib:goodstream-extractor'))
implementation(project(':lib:universal-extractor'))
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import eu.kanade.tachiyomi.lib.filemoonextractor.FilemoonExtractor
import eu.kanade.tachiyomi.lib.goodstramextractor.GoodStreamExtractor
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.vidhideextractor.VidHideExtractor
import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor
import eu.kanade.tachiyomi.network.GET
Expand Down Expand Up @@ -202,6 +203,7 @@ class Hackstore : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
private val doodExtractor by lazy { DoodExtractor(client) }
private val vidHideExtractor by lazy { VidHideExtractor(client, headers) }
private val goodStreamExtractor by lazy { GoodStreamExtractor(client, headers) }
private val universalExtractor by lazy { UniversalExtractor(client) }

override fun videoListParse(response: Response): List<Video> {
val document = response.asJsoup()
Expand Down Expand Up @@ -233,7 +235,7 @@ class Hackstore : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
server.contains("goodstream") || server.contains("vidstream") -> {
goodStreamExtractor.videosFromUrl(url, "$prefix GoodStream")
}
else -> emptyList()
else -> universalExtractor.videosFromUrl(url, headers, prefix = prefix)
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/es/hentaila/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'HentaiLA'
extClass = '.Hentaila'
extVersionCode = 27
extVersionCode = 28
isNsfw = true
}

Expand All @@ -14,4 +14,5 @@ dependencies {
implementation(project(':lib:voe-extractor'))
implementation(project(':lib:yourupload-extractor'))
implementation(project(':lib:streamhidevid-extractor'))
implementation(project(':lib:universal-extractor'))
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import eu.kanade.tachiyomi.lib.burstcloudextractor.BurstCloudExtractor
import eu.kanade.tachiyomi.lib.mp4uploadextractor.Mp4uploadExtractor
import eu.kanade.tachiyomi.lib.streamhidevidextractor.StreamHideVidExtractor
import eu.kanade.tachiyomi.lib.streamwishextractor.StreamWishExtractor
import eu.kanade.tachiyomi.lib.universalextractor.UniversalExtractor
import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor
import eu.kanade.tachiyomi.lib.youruploadextractor.YourUploadExtractor
import eu.kanade.tachiyomi.network.GET
Expand Down Expand Up @@ -206,6 +207,7 @@ class Hentaila : ConfigurableAnimeSource, AnimeHttpSource() {
private val mp4uploadExtractor by lazy { Mp4uploadExtractor(client) }
private val burstCloudExtractor by lazy { BurstCloudExtractor(client) }
private val streamHideVidExtractor by lazy { StreamHideVidExtractor(client) }
private val universalExtractor by lazy { UniversalExtractor(client) }

override fun videoListParse(response: Response): List<Video> {
val document = response.asJsoup()
Expand All @@ -227,7 +229,7 @@ class Hentaila : ConfigurableAnimeSource, AnimeHttpSource() {
"mp4upload" -> mp4uploadExtractor.videosFromUrl(urlServer, headers = headers)
"burst" -> burstCloudExtractor.videoFromUrl(urlServer, headers = headers)
"vidhide", "streamhide", "guccihide", "streamvid" -> streamHideVidExtractor.videosFromUrl(urlServer)
else -> emptyList()
else -> universalExtractor.videosFromUrl(urlServer, headers)
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/es/hentaitk/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'HentaiTk'
extClass = '.Hentaitk'
extVersionCode = 8
extVersionCode = 9
isNsfw = true
}

Expand All @@ -15,4 +15,5 @@ dependencies {
implementation(project(':lib:yourupload-extractor'))
implementation(project(':lib:dood-extractor'))
implementation(project(':lib:streamtape-extractor'))
implementation(project(':lib:universal-extractor'))
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import eu.kanade.tachiyomi.lib.okruextractor.OkruExtractor
import eu.kanade.tachiyomi.lib.streamhidevidextractor.StreamHideVidExtractor
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.voeextractor.VoeExtractor
import eu.kanade.tachiyomi.lib.youruploadextractor.YourUploadExtractor
import eu.kanade.tachiyomi.network.GET
Expand Down Expand Up @@ -141,6 +142,7 @@ class Hentaitk : ConfigurableAnimeSource, AnimeHttpSource() {
private val streamHideVidExtractor by lazy { StreamHideVidExtractor(client) }
private val doodExtractor by lazy { DoodExtractor(client) }
private val streamTapeExtractor by lazy { StreamTapeExtractor(client) }
private val universalExtractor by lazy { UniversalExtractor(client) }

private fun serverVideoResolver(url: String): List<Video> {
val embedUrl = url.lowercase()
Expand All @@ -165,7 +167,7 @@ class Hentaitk : ConfigurableAnimeSource, AnimeHttpSource() {
embedUrl.contains("streamtape") || embedUrl.contains("stp") ||
embedUrl.contains("stape")
-> streamTapeExtractor.videosFromUrl(url, quality = "StreamTape")
else -> emptyList()
else -> universalExtractor.videosFromUrl(url, headers)
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/es/lacartoons/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'LACartoons'
extClass = '.Lacartoons'
extVersionCode = 6
extVersionCode = 7
}

apply from: "$rootDir/common.gradle"
Expand All @@ -12,4 +12,5 @@ dependencies {
implementation(project(':lib:streamhidevid-extractor'))
implementation(project(':lib:voe-extractor'))
implementation(project(':lib:yourupload-extractor'))
implementation(project(':lib:universal-extractor'))
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import eu.kanade.tachiyomi.animesource.online.AnimeHttpSource
import eu.kanade.tachiyomi.lib.okruextractor.OkruExtractor
import eu.kanade.tachiyomi.lib.streamhidevidextractor.StreamHideVidExtractor
import eu.kanade.tachiyomi.lib.streamwishextractor.StreamWishExtractor
import eu.kanade.tachiyomi.lib.universalextractor.UniversalExtractor
import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor
import eu.kanade.tachiyomi.lib.youruploadextractor.YourUploadExtractor
import eu.kanade.tachiyomi.network.GET
Expand Down Expand Up @@ -147,7 +148,7 @@ class Lacartoons : ConfigurableAnimeSource, AnimeHttpSource() {
embedUrl.contains("guccihide") || embedUrl.contains("streamvid") -> StreamHideVidExtractor(client).videosFromUrl(url)
embedUrl.contains("voe") -> VoeExtractor(client).videosFromUrl(url)
embedUrl.contains("yourupload") || embedUrl.contains("upload") -> YourUploadExtractor(client).videoFromUrl(url, headers = headers)
else -> emptyList()
else -> UniversalExtractor(client).videosFromUrl(url, headers)
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/es/latanime/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Latanime'
extClass = '.Latanime'
extVersionCode = 21
extVersionCode = 22
}

apply from: "$rootDir/common.gradle"
Expand All @@ -12,5 +12,6 @@ dependencies {
implementation(project(':lib:yourupload-extractor'))
implementation(project(':lib:okru-extractor'))
implementation(project(':lib:dood-extractor'))
implementation "dev.datlag.jsunpacker:jsunpacker:1.0.1"
implementation(project(':lib:universal-extractor'))
implementation libs.jsunpacker
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import eu.kanade.tachiyomi.animesource.online.ParsedAnimeHttpSource
import eu.kanade.tachiyomi.lib.doodextractor.DoodExtractor
import eu.kanade.tachiyomi.lib.mp4uploadextractor.Mp4uploadExtractor
import eu.kanade.tachiyomi.lib.okruextractor.OkruExtractor
import eu.kanade.tachiyomi.lib.universalextractor.UniversalExtractor
import eu.kanade.tachiyomi.lib.uqloadextractor.UqloadExtractor
import eu.kanade.tachiyomi.lib.youruploadextractor.YourUploadExtractor
import eu.kanade.tachiyomi.network.GET
Expand Down Expand Up @@ -304,6 +305,10 @@ class Latanime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
val videos = YourUploadExtractor(client).videoFromUrl(url, headers = headers, name = "Original", prefix = prefix)
videoList.addAll(videos)
}
else -> {
val videos = UniversalExtractor(client).videosFromUrl(url, headers)
videoList.addAll(videos)
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/es/metroseries/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'MetroSeries'
extClass = '.MetroSeries'
extVersionCode = 13
extVersionCode = 14
}

apply from: "$rootDir/common.gradle"
Expand All @@ -15,4 +15,5 @@ dependencies {
implementation(project(':lib:fastream-extractor'))
implementation(project(':lib:upstream-extractor'))
implementation(project(':lib:filemoon-extractor'))
implementation(project(':lib:universal-extractor'))
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import eu.kanade.tachiyomi.lib.fastreamextractor.FastreamExtractor
import eu.kanade.tachiyomi.lib.filemoonextractor.FilemoonExtractor
import eu.kanade.tachiyomi.lib.mp4uploadextractor.Mp4uploadExtractor
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.voeextractor.VoeExtractor
import eu.kanade.tachiyomi.lib.youruploadextractor.YourUploadExtractor
Expand Down Expand Up @@ -255,6 +256,10 @@ class MetroSeries : ConfigurableAnimeSource, AnimeHttpSource() {
if (src.contains("filemoon") || src.contains("moonplayer")) {
FilemoonExtractor(client).videosFromUrl(src, headers = headers, prefix = "$prefix Filemoon:").let { videoList.addAll(it) }
}
// si los demas fallan intenta con universal
if (videoList.isEmpty()) {
UniversalExtractor(client).videosFromUrl(src, headers, prefix = prefix).let { videoList.addAll(it) }
}
} catch (_: Exception) {}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/es/monoschinos/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'MonosChinos'
extClass = '.MonosChinos'
extVersionCode = 29
extVersionCode = 30
}

apply from: "$rootDir/common.gradle"
Expand All @@ -16,4 +16,5 @@ dependencies {
implementation(project(':lib:streamwish-extractor'))
implementation(project(':lib:mixdrop-extractor'))
implementation(project(':lib:dood-extractor'))
implementation(project(':lib:universal-extractor'))
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import eu.kanade.tachiyomi.lib.mp4uploadextractor.Mp4uploadExtractor
import eu.kanade.tachiyomi.lib.okruextractor.OkruExtractor
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.uqloadextractor.UqloadExtractor
import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor
import eu.kanade.tachiyomi.network.GET
Expand Down Expand Up @@ -181,7 +182,7 @@ class MonosChinos : ConfigurableAnimeSource, AnimeHttpSource() {
val document = response.asJsoup()
return document.select("[data-player]")
.map { String(Base64.decode(it.attr("data-player"), Base64.DEFAULT)) }
.parallelCatchingFlatMapBlocking { serverVideoResolver(it) }
.parallelCatchingFlatMapBlocking { serverVideoResolver(it) }.sort()
}

override fun getFilterList(): AnimeFilterList = MonosChinosFilters.FILTER_LIST
Expand All @@ -195,6 +196,7 @@ class MonosChinos : ConfigurableAnimeSource, AnimeHttpSource() {
private val uqloadExtractor by lazy { UqloadExtractor(client) }
private val okruExtractor by lazy { OkruExtractor(client) }
private val mp4uploadExtractor by lazy { Mp4uploadExtractor(client) }
private val universalExtractor by lazy { UniversalExtractor(client) }

private fun serverVideoResolver(url: String): List<Video> {
val embedUrl = url.lowercase()
Expand All @@ -209,7 +211,7 @@ class MonosChinos : ConfigurableAnimeSource, AnimeHttpSource() {
embedUrl.contains("filelions") || embedUrl.contains("lion") -> streamwishExtractor.videosFromUrl(url, videoNameGen = { "FileLions:$it" })
embedUrl.contains("mp4upload") || embedUrl.contains("mp4") -> mp4uploadExtractor.videosFromUrl(url, headers)
embedUrl.contains("mix") -> mixdropExtractor.videosFromUrl(url)
else -> emptyList()
else -> universalExtractor.videosFromUrl(url, headers)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class MundoDonghua : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
}
}
}
return videoList
return videoList.sort()
}

override fun videoListSelector() = throw UnsupportedOperationException()
Expand Down
3 changes: 2 additions & 1 deletion src/es/pelisplushd/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Pelisplushd'
extClass = '.PelisplushdFactory'
extVersionCode = 66
extVersionCode = 67
}

apply from: "$rootDir/common.gradle"
Expand All @@ -25,5 +25,6 @@ dependencies {
implementation(project(':lib:streamhidevid-extractor'))
implementation(project(':lib:streamsilk-extractor'))
implementation(project(':lib:vidguard-extractor'))
implementation(project(':lib:universal-extractor'))
implementation libs.jsunpacker
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import eu.kanade.tachiyomi.lib.streamlareextractor.StreamlareExtractor
import eu.kanade.tachiyomi.lib.streamsilkextractor.StreamSilkExtractor
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.vidguardextractor.VidGuardExtractor
Expand Down Expand Up @@ -149,7 +150,7 @@ open class Pelisplushd(override val name: String, override val baseUrl: String)
}.also(videoList::addAll)
}
}
return videoList
return videoList.sort()
}

/*--------------------------------Video extractors------------------------------------*/
Expand All @@ -169,6 +170,7 @@ open class Pelisplushd(override val name: String, override val baseUrl: String)
private val streamHideVidExtractor by lazy { StreamHideVidExtractor(client) }
private val streamSilkExtractor by lazy { StreamSilkExtractor(client) }
private val vidGuardExtractor by lazy { VidGuardExtractor(client) }
private val universalExtractor by lazy { UniversalExtractor(client) }

fun serverVideoResolver(url: String, prefix: String = ""): List<Video> {
return runCatching {
Expand Down Expand Up @@ -211,7 +213,7 @@ open class Pelisplushd(override val name: String, override val baseUrl: String)
arrayOf("streamtape", "stp", "stape").any(url) -> streamTapeExtractor.videosFromUrl(url, quality = "$prefix StreamTape")
arrayOf("ahvsh", "streamhide", "guccihide", "streamvid", "vidhide").any(url) -> streamHideVidExtractor.videosFromUrl(url, prefix = "$prefix ")
arrayOf("vembed", "guard", "listeamed", "bembed", "vgfplay").any(url) -> vidGuardExtractor.videosFromUrl(url, prefix = "$prefix ")
else -> emptyList()
else -> universalExtractor.videosFromUrl(url, headers, prefix = "$prefix ")
}
}.getOrNull() ?: emptyList()
}
Expand Down
3 changes: 2 additions & 1 deletion src/es/tioanimeh/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'TioanimeH'
extClass = '.TioanimeHFactory'
extVersionCode = 21
extVersionCode = 22
}

apply from: "$rootDir/common.gradle"
Expand All @@ -12,4 +12,5 @@ dependencies {
implementation(project(':lib:voe-extractor'))
implementation(project(':lib:mixdrop-extractor'))
implementation(project(':lib:vidguard-extractor'))
implementation(project(':lib:universal-extractor'))
}
Loading

0 comments on commit c3679be

Please sign in to comment.