diff --git a/Hentaiheaven/build.gradle.kts b/Hentaiheaven/build.gradle.kts index 017bc97a..1306ce5e 100644 --- a/Hentaiheaven/build.gradle.kts +++ b/Hentaiheaven/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 3 +version = 4 cloudstream { diff --git a/Hentaiheaven/src/main/kotlin/com/hexated/Hentaiheaven.kt b/Hentaiheaven/src/main/kotlin/com/hexated/Hentaiheaven.kt index aea799a0..568c1417 100644 --- a/Hentaiheaven/src/main/kotlin/com/hexated/Hentaiheaven.kt +++ b/Hentaiheaven/src/main/kotlin/com/hexated/Hentaiheaven.kt @@ -55,7 +55,7 @@ class Hentaiheaven : MainAPI() { val link = "$mainUrl/?s=$query&post_type=wp-manga" val document = app.get(link).document - return document.select("div.c-tabs-item div.row.c-tabs-item__content").mapNotNull { + return document.select("div.c-tabs-item > div.c-tabs-item__content").mapNotNull { it.toSearchResult() } } diff --git a/OploverzProvider/build.gradle.kts b/OploverzProvider/build.gradle.kts index 928dbcf4..e021c6c2 100644 --- a/OploverzProvider/build.gradle.kts +++ b/OploverzProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 29 +version = 30 cloudstream { diff --git a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt index 908f97bb..37c0cf9e 100644 --- a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt +++ b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt @@ -7,7 +7,7 @@ import com.lagradost.cloudstream3.utils.* import org.jsoup.nodes.Element class OploverzProvider : MainAPI() { - override var mainUrl = "https://oploverz.guru" + override var mainUrl = "https://oploverz.gold" override var name = "Oploverz" override val hasMainPage = true override var lang = "id" @@ -20,7 +20,6 @@ class OploverzProvider : MainAPI() { ) companion object { - const val acefile = "https://acefile.co" fun getType(t: String): TvType { return if (t.contains("OVA", true) || t.contains("Special")) TvType.OVA else if (t.contains("Movie", true)) TvType.AnimeMovie @@ -170,14 +169,14 @@ class OploverzProvider : MainAPI() { headers = mapOf("X-Requested-With" to "XMLHttpRequest") ).document.select("iframe").attr("src") - loadExtractor(fixedIframe(iframe), "$mainUrl/", subtitleCallback, callback) + loadExtractor(fixUrl(iframe), "$mainUrl/", subtitleCallback, callback) } }, { - document.select("div#download tr").map { el -> + document.select("div#download tr").apmap { el -> el.select("a").apmap { - loadFixedExtractor(fixedIframe(it.attr("href")), el.select("strong").text(), "$mainUrl/", subtitleCallback, callback) + loadFixedExtractor(fixUrl(it.attr("href")), el.select("strong").text(), "$mainUrl/", subtitleCallback, callback) } } } @@ -217,12 +216,4 @@ class OploverzProvider : MainAPI() { } } - private fun fixedIframe(url: String): String { - val id = Regex("""(?:/f/|/file/)(\w+)""").find(url)?.groupValues?.getOrNull(1) - return when { - url.startsWith(acefile) -> "${acefile}/player/$id" - else -> fixUrl(url) - } - } - } diff --git a/Samehadaku/build.gradle.kts b/Samehadaku/build.gradle.kts index f1f9be79..94602b00 100644 --- a/Samehadaku/build.gradle.kts +++ b/Samehadaku/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 21 +version = 22 cloudstream { diff --git a/Samehadaku/src/main/kotlin/com/hexated/Samehadaku.kt b/Samehadaku/src/main/kotlin/com/hexated/Samehadaku.kt index 95770cea..1a6c1c70 100644 --- a/Samehadaku/src/main/kotlin/com/hexated/Samehadaku.kt +++ b/Samehadaku/src/main/kotlin/com/hexated/Samehadaku.kt @@ -10,19 +10,17 @@ import com.lagradost.cloudstream3.utils.loadExtractor import org.jsoup.nodes.Element class Samehadaku : MainAPI() { - override var mainUrl = "https://samehadaku.guru" + override var mainUrl = "https://samehadaku.show" override var name = "Samehadaku" override val hasMainPage = true override var lang = "id" override val hasDownloadSupport = true override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA + TvType.Anime, + TvType.AnimeMovie, + TvType.OVA ) companion object { - const val acefile = "https://acefile.co" - fun getType(t: String): TvType { return if (t.contains("OVA", true) || t.contains("Special", true)) TvType.OVA else if (t.contains("Movie", true)) TvType.AnimeMovie @@ -39,13 +37,13 @@ class Samehadaku : MainAPI() { } override val mainPage = mainPageOf( - "$mainUrl/page/" to "Episode Terbaru", - "$mainUrl/" to "HomePage", + "$mainUrl/page/" to "Episode Terbaru", + "$mainUrl/" to "HomePage", ) override suspend fun getMainPage( - page: Int, - request: MainPageRequest + page: Int, + request: MainPageRequest ): HomePageResponse { val items = mutableListOf() @@ -62,9 +60,9 @@ class Samehadaku : MainAPI() { if (request.name == "Episode Terbaru") { val home = app.get(request.data + page).document.selectFirst("div.post-show")?.select("ul li") - ?.mapNotNull { - it.toSearchResult() - } ?: throw ErrorLoadingException("No Media Found") + ?.mapNotNull { + it.toSearchResult() + } ?: throw ErrorLoadingException("No Media Found") items.add(HomePageList(request.name, home, true)) } @@ -74,7 +72,7 @@ class Samehadaku : MainAPI() { private fun Element.toSearchResult(): AnimeSearchResponse? { val title = this.selectFirst("div.title, h2.entry-title a, div.lftinfo h2")?.text()?.trim() - ?: return null + ?: return null val href = fixUrlNull(this.selectFirst("a")?.attr("href") ?: return null) val posterUrl = fixUrlNull(this.select("img").attr("src")) val epNum = this.selectFirst("div.dtla author")?.text()?.toIntOrNull() @@ -107,11 +105,11 @@ class Samehadaku : MainAPI() { Regex("\\d,\\s(\\d*)").find(it)?.groupValues?.getOrNull(1)?.toIntOrNull() } val status = getStatus( - document.selectFirst("div.spe > span:contains(Status)")?.ownText() ?: return null + document.selectFirst("div.spe > span:contains(Status)")?.ownText() ?: return null ) val type = - getType(document.selectFirst("div.spe > span:contains(Type)")?.ownText()?.trim()?.lowercase() - ?: "tv") + getType(document.selectFirst("div.spe > span:contains(Type)")?.ownText()?.trim()?.lowercase() + ?: "tv") val rating = document.selectFirst("span.ratingValue")?.text()?.trim()?.toRatingInt() val description = document.select("div.desc p").text().trim() val trailer = document.selectFirst("div.trailer-anime iframe")?.attr("src") @@ -119,7 +117,7 @@ class Samehadaku : MainAPI() { val episodes = document.select("div.lstepsiode.listeps ul li").mapNotNull { val header = it.selectFirst("span.lchx > a") ?: return@mapNotNull null val episode = Regex("Episode\\s?(\\d+)").find(header.text())?.groupValues?.getOrNull(1) - ?.toIntOrNull() + ?.toIntOrNull() val link = fixUrl(header.attr("href")) Episode(link, episode = episode) }.reversed() @@ -149,68 +147,42 @@ class Samehadaku : MainAPI() { } override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit + data: String, + isCasting: Boolean, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit ): Boolean { val document = app.get(data).document - argamap( - { - document.select("div#server ul li div").apmap { - val dataPost = it.attr("data-post") - val dataNume = it.attr("data-nume") - val dataType = it.attr("data-type") - - val iframe = app.post( - url = "$mainUrl/wp-admin/admin-ajax.php", - data = mapOf( - "action" to "player_ajax", - "post" to dataPost, - "nume" to dataNume, - "type" to dataType - ), - referer = data, - headers = mapOf("X-Requested-With" to "XMLHttpRequest"), - ).document.select("iframe").attr("src") - - loadFixedExtractor(fixedIframe(iframe), it.text(), "$mainUrl/", subtitleCallback, callback) - - } - }, - { - document.select("div#downloadb li").map { el -> - el.select("a").apmap { - loadFixedExtractor(fixedIframe(it.attr("href")), el.select("strong").text(), "$mainUrl/", subtitleCallback, callback) - } - } - } - ) + document.select("div#downloadb li").map { el -> + el.select("a").apmap { + loadFixedExtractor(fixUrl(it.attr("href")), el.select("strong").text(), "$mainUrl/", subtitleCallback, callback) + } + } return true } private suspend fun loadFixedExtractor( - url: String, - name: String, - referer: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit + url: String, + name: String, + referer: String? = null, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit ) { loadExtractor(url, referer, subtitleCallback) { link -> callback.invoke( - ExtractorLink( - link.name, - link.name, - link.url, - link.referer, - name.fixQuality(), - link.type, - link.headers, - link.extractorData - ) + ExtractorLink( + link.name, + link.name, + link.url, + link.referer, + name.fixQuality(), + link.type, + link.headers, + link.extractorData + ) ) } } @@ -224,14 +196,6 @@ class Samehadaku : MainAPI() { } } - private fun fixedIframe(url: String): String { - val id = Regex("""(?:/f/|/file/)(\w+)""").find(url)?.groupValues?.getOrNull(1) - return when { - url.startsWith(acefile) -> "${acefile}/player/$id" - else -> fixUrl(url) - } - } - private fun String.removeBloat(): String { return this.replace(Regex("(Nonton)|(Anime)|(Subtitle\\sIndonesia)"), "").trim() } diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index 334cb5c4..74dbdf5e 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 222 +version = 223 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index d8ef6a06..24749e70 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -389,7 +389,6 @@ object SoraExtractor : SoraStream() { callback, true, hasCloudflare = true, - interceptor = multiInterceptor ) } @@ -1421,30 +1420,20 @@ object SoraExtractor : SoraStream() { subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit ) { - val slugTitle = title.createSlug() + val slugTitle = title?.createSlug() val (seasonSlug, episodeSlug) = getEpisodeSlug(season, episode) - val req = app.get("$m4uhdAPI/search/$slugTitle.html") + val req = app.get("$m4uhdAPI/search/$slugTitle.html", timeout = 20) val referer = getBaseUrl(req.url) - val scriptData = req.document.select("div.row div.item").map { ele -> - Triple( - ele.select("div.tiptitle p").text().substringBefore("(").trim().createSlug(), - ele.select("div.jtip-top div:last-child").text().filter { it.isDigit() }, - ele.selectFirst("a")?.attr("href") - ) - } - val script = if (scriptData.size == 1) { - scriptData.firstOrNull() + val media = req.document.select("div.row div.item > a").map { it.attr("href") } + val mediaUrl = if(media.size == 1) { + media.first() } else { - scriptData.find { - it.first.equals(slugTitle) && it.second == "$year" && if (season != null) it.third?.contains( - "-tvshow-" - ) == true else it.third?.contains("-movie-") == true - } + media.find { it.contains("-$slugTitle-") && it.contains("-$year-") } } - val link = fixUrl(script?.third ?: return, referer) - val request = app.get(link) + val link = fixUrl(mediaUrl ?: return, referer) + val request = app.get(link, timeout = 20) var cookies = request.cookies val headers = mapOf("Accept" to "*/*", "X-Requested-With" to "XMLHttpRequest") @@ -1454,15 +1443,13 @@ object SoraExtractor : SoraStream() { doc.select("div.le-server span").map { it.attr("data") } } else { val idepisode = - doc.selectFirst("div.detail > p:matches((?i)S$seasonSlug-E$episodeSlug) button") + doc.selectFirst("div.season > p:matches((?i)S$seasonSlug-E$episodeSlug) button") ?.attr("idepisode") ?: return val requestEmbed = app.post( - "$referer/ajaxtv", - data = mapOf("idepisode" to idepisode, "_token" to "$token"), - referer = link, - headers = headers, - cookies = cookies + "$referer/ajaxtv", data = mapOf( + "idepisode" to idepisode, "_token" to "$token" + ), referer = link, headers = headers, cookies = cookies, timeout = 20 ) cookies = requestEmbed.cookies requestEmbed.document.select("div.le-server span").map { it.attr("data") } @@ -1475,6 +1462,7 @@ object SoraExtractor : SoraStream() { referer = link, headers = headers, cookies = cookies, + timeout = 20 ).document.select("iframe").attr("src") loadExtractor(iframe, referer, subtitleCallback, callback) @@ -2084,7 +2072,7 @@ object SoraExtractor : SoraStream() { base64Decode("X2lkZW50aXR5Z29tb3ZpZXM3") to base64Decode("NTJmZGM3MGIwMDhjMGIxZDg4MWRhYzBmMDFjY2E4MTllZGQ1MTJkZTAxY2M4YmJjMTIyNGVkNGFhZmI3OGI1MmElM0EyJTNBJTdCaSUzQTAlM0JzJTNBMTglM0ElMjJfaWRlbnRpdHlnb21vdmllczclMjIlM0JpJTNBMSUzQnMlM0E1MiUzQSUyMiU1QjIwNTAzNjYlMkMlMjJIblZSUkFPYlRBU09KRXI0NVl5Q004d2lIb2wwVjFrbyUyMiUyQzI1OTIwMDAlNUQlMjIlM0IlN0Q="), ) - var res = app.get("$api/search/$query") + var res = app.get("$api/search/$query", timeout = 20) val cookies = savedCookies + res.cookies val doc = res.document val media = doc.select("div.$mediaSelector").map { @@ -2109,12 +2097,12 @@ object SoraExtractor : SoraStream() { val iframe = if (season == null) { media.third } else { - app.get(fixUrl(media.third, api), cookies = cookies) + app.get(fixUrl(media.third, api), cookies = cookies, timeout = 20) .document.selectFirst("div#$episodeSelector a:contains(Episode ${slug.second})") ?.attr("href") } - res = app.get(fixUrl(iframe ?: return, api), cookies = cookies) + res = app.get(fixUrl(iframe ?: return, api), cookies = cookies, timeout = 20) val url = res.document.select("meta[property=og:url]").attr("content") val headers = mapOf("X-Requested-With" to "XMLHttpRequest") val qualities = intArrayOf(2160, 1440, 1080, 720, 480, 360) @@ -2129,17 +2117,19 @@ object SoraExtractor : SoraStream() { "$api/user/servers/$serverId?ep=$episodeId", cookies = cookies, referer = url, - headers = headers + headers = headers, + timeout = 20 ) val script = getAndUnpack(serverRes.text) - val key = """\(key\s*=\s*(\d+)\)""".toRegex().find(script)?.groupValues?.get(1) ?: return + val key = """key\s*=\s*(\d+)""".toRegex().find(script)?.groupValues?.get(1) ?: return serverRes.document.select("ul li").apmap { el -> val server = el.attr("data-value") val encryptedData = app.get( "$url?server=$server&_=$unixTimeMS", cookies = cookies, referer = url, - headers = headers + headers = headers, + timeout = 20 ).text val links = encryptedData.decrypt(key) links?.forEach { video -> @@ -2382,7 +2372,7 @@ object SoraExtractor : SoraStream() { season: Int? = null, episode: Int? = null, callback: (ExtractorLink) -> Unit, - host: String = "https://weisatted-forminsting-i-277.site", + host: String = "https://dozzlegram-duj-i-280.site", ) { val res = app.get( "$host/play/$imdbId", diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 5c88a625..2f12c19e 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -66,7 +66,6 @@ open class SoraStream : TmdbProvider() { ) val wpRedisInterceptor by lazy { CloudflareKiller() } - val multiInterceptor by lazy { CloudflareKiller() } /** AUTHOR : Hexated & Sora */ companion object { @@ -91,7 +90,7 @@ open class SoraStream : TmdbProvider() { const val crunchyrollAPI = "https://beta-api.crunchyroll.com" const val kissKhAPI = "https://kisskh.co" const val lingAPI = "https://ling-online.net" - const val m4uhdAPI = "https://ww2.m4ufree.com" + const val m4uhdAPI = "https://m4umv.org" const val rStreamAPI = "https://remotestream.cc" const val flixonAPI = "https://flixon.lol" const val smashyStreamAPI = "https://embed.smashystream.com"