forked from recloudstream/cloudstream
		
	fix layarkaca/gomunime/kuronime (#1092)
This commit is contained in:
		
							parent
							
								
									9b94853199
								
							
						
					
					
						commit
						509a240e5a
					
				
					 9 changed files with 81 additions and 27 deletions
				
			
		|  | @ -89,7 +89,7 @@ object APIHolder { | ||||||
|             TantifilmProvider(), |             TantifilmProvider(), | ||||||
|             HDMovie5(), |             HDMovie5(), | ||||||
|             RebahinProvider(), |             RebahinProvider(), | ||||||
|             LayarKaca21Provider(), |             LayarKacaProvider(), | ||||||
| 
 | 
 | ||||||
|             // Metadata providers |             // Metadata providers | ||||||
|             //TmdbProvider(), |             //TmdbProvider(), | ||||||
|  |  | ||||||
|  | @ -3,20 +3,11 @@ package com.lagradost.cloudstream3.animeproviders | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty | import com.fasterxml.jackson.annotation.JsonProperty | ||||||
| import com.lagradost.cloudstream3.* | import com.lagradost.cloudstream3.* | ||||||
| import org.jsoup.Jsoup | import org.jsoup.Jsoup | ||||||
| import org.jsoup.nodes.Element |  | ||||||
| import java.util.* | import java.util.* | ||||||
| import com.fasterxml.jackson.module.kotlin.readValue |  | ||||||
| import com.lagradost.cloudstream3.movieproviders.SflixProvider |  | ||||||
| import com.lagradost.cloudstream3.movieproviders.SflixProvider.Companion.extractRabbitStream |  | ||||||
| import com.lagradost.cloudstream3.movieproviders.SflixProvider.Companion.toExtractorLink |  | ||||||
| import com.lagradost.cloudstream3.mvvm.logError | import com.lagradost.cloudstream3.mvvm.logError | ||||||
| import com.lagradost.cloudstream3.mvvm.safeApiCall | import com.lagradost.cloudstream3.mvvm.safeApiCall | ||||||
| import com.lagradost.cloudstream3.utils.* | import com.lagradost.cloudstream3.utils.* | ||||||
| import com.lagradost.cloudstream3.utils.AppUtils.parseJson | import com.lagradost.cloudstream3.utils.AppUtils.parseJson | ||||||
| import com.lagradost.nicehttp.Requests.Companion.await |  | ||||||
| import kotlinx.coroutines.runBlocking |  | ||||||
| import okhttp3.Interceptor |  | ||||||
| import java.net.URI |  | ||||||
| 
 | 
 | ||||||
| class GomunimeProvider : MainAPI() { | class GomunimeProvider : MainAPI() { | ||||||
|     override var mainUrl = "https://185.231.223.76" |     override var mainUrl = "https://185.231.223.76" | ||||||
|  | @ -210,7 +201,8 @@ class GomunimeProvider : MainAPI() { | ||||||
|                             M3u8Helper.generateM3u8( |                             M3u8Helper.generateM3u8( | ||||||
|                                 this.name, |                                 this.name, | ||||||
|                                 link, |                                 link, | ||||||
|                                 mainUrl, |                                 "$mainUrl/", | ||||||
|  |                                 headers = mapOf("Origin" to mainUrl) | ||||||
|                             ).forEach(callback) |                             ).forEach(callback) | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|  | @ -1,6 +1,5 @@ | ||||||
| package com.lagradost.cloudstream3.animeproviders | package com.lagradost.cloudstream3.animeproviders | ||||||
| 
 | 
 | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty |  | ||||||
| import com.lagradost.cloudstream3.* | import com.lagradost.cloudstream3.* | ||||||
| import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer | import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer | ||||||
| import com.lagradost.cloudstream3.mvvm.safeApiCall | import com.lagradost.cloudstream3.mvvm.safeApiCall | ||||||
|  | @ -157,6 +156,8 @@ class KuronimeProvider : MainAPI() { | ||||||
|                 val token = data.substringAfter("var token = \"").substringBefore("\";") |                 val token = data.substringAfter("var token = \"").substringBefore("\";") | ||||||
|                 val pat = data.substringAfter("var pat = \"").substringBefore("\";") |                 val pat = data.substringAfter("var pat = \"").substringBefore("\";") | ||||||
|                 val link = "$doma$token$pat/index.m3u8" |                 val link = "$doma$token$pat/index.m3u8" | ||||||
|  |                 val quality = | ||||||
|  |                     Regex("\\d{3,4}p").find(doc.select("title").text())?.groupValues?.get(0) | ||||||
| 
 | 
 | ||||||
|                 sourceCallback.invoke( |                 sourceCallback.invoke( | ||||||
|                     ExtractorLink( |                     ExtractorLink( | ||||||
|  | @ -164,7 +165,8 @@ class KuronimeProvider : MainAPI() { | ||||||
|                         this.name, |                         this.name, | ||||||
|                         link, |                         link, | ||||||
|                         referer = "https://animeku.org/", |                         referer = "https://animeku.org/", | ||||||
|                         quality = Qualities.Unknown.value, |                         quality = getQualityFromName(quality), | ||||||
|  |                         headers = mapOf("Origin" to "https://animeku.org"), | ||||||
|                         isM3u8 = true |                         isM3u8 = true | ||||||
|                     ) |                     ) | ||||||
|                 ) |                 ) | ||||||
|  | @ -186,7 +188,7 @@ class KuronimeProvider : MainAPI() { | ||||||
|         sources.apmap { |         sources.apmap { | ||||||
|             safeApiCall { |             safeApiCall { | ||||||
|                 when { |                 when { | ||||||
|                     it.contains("animeku.org") -> invokeKuroSource(it, callback) |                     it.startsWith("https://animeku.org") -> invokeKuroSource(it, callback) | ||||||
|                     else -> loadExtractor(it, mainUrl, callback) |                     else -> loadExtractor(it, mainUrl, callback) | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  | @ -1,8 +1,6 @@ | ||||||
| package com.lagradost.cloudstream3.animeproviders | package com.lagradost.cloudstream3.animeproviders | ||||||
| 
 | 
 | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty |  | ||||||
| import com.lagradost.cloudstream3.* | import com.lagradost.cloudstream3.* | ||||||
| import com.lagradost.cloudstream3.mvvm.safeApiCall |  | ||||||
| import com.lagradost.cloudstream3.utils.ExtractorLink | import com.lagradost.cloudstream3.utils.ExtractorLink | ||||||
| import com.lagradost.cloudstream3.utils.loadExtractor | import com.lagradost.cloudstream3.utils.loadExtractor | ||||||
| import org.jsoup.nodes.Element | import org.jsoup.nodes.Element | ||||||
|  | @ -33,6 +31,7 @@ class NeonimeProvider : MainAPI() { | ||||||
|             return when (t) { |             return when (t) { | ||||||
|                 "Ended"  -> ShowStatus.Completed |                 "Ended"  -> ShowStatus.Completed | ||||||
|                 "OnGoing" -> ShowStatus.Ongoing |                 "OnGoing" -> ShowStatus.Ongoing | ||||||
|  |                 "Ongoing" -> ShowStatus.Ongoing | ||||||
|                 "In Production" -> ShowStatus.Ongoing |                 "In Production" -> ShowStatus.Ongoing | ||||||
|                 "Returning Series" -> ShowStatus.Ongoing |                 "Returning Series" -> ShowStatus.Ongoing | ||||||
|                 else -> ShowStatus.Completed |                 else -> ShowStatus.Completed | ||||||
|  |  | ||||||
|  | @ -4,6 +4,7 @@ import com.lagradost.cloudstream3.app | ||||||
| import com.lagradost.cloudstream3.utils.ExtractorApi | import com.lagradost.cloudstream3.utils.ExtractorApi | ||||||
| import com.lagradost.cloudstream3.utils.ExtractorLink | import com.lagradost.cloudstream3.utils.ExtractorLink | ||||||
| import com.lagradost.cloudstream3.utils.Qualities | import com.lagradost.cloudstream3.utils.Qualities | ||||||
|  | import com.lagradost.cloudstream3.utils.getQualityFromName | ||||||
| import kotlinx.coroutines.delay | import kotlinx.coroutines.delay | ||||||
| 
 | 
 | ||||||
| class DoodCxExtractor : DoodLaExtractor() { | class DoodCxExtractor : DoodLaExtractor() { | ||||||
|  | @ -40,13 +41,14 @@ open class DoodLaExtractor : ExtractorApi() { | ||||||
|         val response0 = app.get(url).text // html of DoodStream page to look for /pass_md5/... |         val response0 = app.get(url).text // html of DoodStream page to look for /pass_md5/... | ||||||
|         val md5 =mainUrl+(Regex("/pass_md5/[^']*").find(response0)?.value ?: return null)  // get https://dood.ws/pass_md5/... |         val md5 =mainUrl+(Regex("/pass_md5/[^']*").find(response0)?.value ?: return null)  // get https://dood.ws/pass_md5/... | ||||||
|         val trueUrl = app.get(md5, referer = url).text + "zUEJeL3mUN?token=" + md5.substringAfterLast("/")   //direct link to extract  (zUEJeL3mUN is random) |         val trueUrl = app.get(md5, referer = url).text + "zUEJeL3mUN?token=" + md5.substringAfterLast("/")   //direct link to extract  (zUEJeL3mUN is random) | ||||||
|  |         val quality = Regex("\\d{3,4}p").find(response0.substringAfter("<title>").substringBefore("</title>"))?.groupValues?.get(0) | ||||||
|         return listOf( |         return listOf( | ||||||
|             ExtractorLink( |             ExtractorLink( | ||||||
|                 trueUrl, |                 trueUrl, | ||||||
|                 this.name, |                 this.name, | ||||||
|                 trueUrl, |                 trueUrl, | ||||||
|                 mainUrl, |                 mainUrl, | ||||||
|                 Qualities.Unknown.value, |                 getQualityFromName(quality), | ||||||
|                 false |                 false | ||||||
|             ) |             ) | ||||||
|         ) // links are valid in 8h |         ) // links are valid in 8h | ||||||
|  |  | ||||||
|  | @ -0,0 +1,45 @@ | ||||||
|  | package com.lagradost.cloudstream3.extractors | ||||||
|  | 
 | ||||||
|  | import com.fasterxml.jackson.annotation.JsonProperty | ||||||
|  | import com.lagradost.cloudstream3.app | ||||||
|  | import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson | ||||||
|  | import com.lagradost.cloudstream3.utils.ExtractorApi | ||||||
|  | import com.lagradost.cloudstream3.utils.ExtractorLink | ||||||
|  | import com.lagradost.cloudstream3.utils.getQualityFromName | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class Solidfiles : ExtractorApi() { | ||||||
|  |     override val name = "Solidfiles" | ||||||
|  |     override val mainUrl = "https://www.solidfiles.com" | ||||||
|  |     override val requiresReferer = false | ||||||
|  | 
 | ||||||
|  |     override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> { | ||||||
|  |         val sources = mutableListOf<ExtractorLink>() | ||||||
|  |         with(app.get(url).document) { | ||||||
|  |             this.select("script").map { script -> | ||||||
|  |                 if (script.data().contains("\"streamUrl\":")) { | ||||||
|  |                     val data = script.data().substringAfter("constant('viewerOptions', {").substringBefore("});") | ||||||
|  |                     val source = tryParseJson<ResponseSource>("{$data}") | ||||||
|  |                     val quality = Regex("\\d{3,4}p").find(source!!.nodeName)?.groupValues?.get(0) | ||||||
|  |                     sources.add( | ||||||
|  |                         ExtractorLink( | ||||||
|  |                             name, | ||||||
|  |                             name, | ||||||
|  |                             source.streamUrl, | ||||||
|  |                             referer = url, | ||||||
|  |                             quality = getQualityFromName(quality) | ||||||
|  |                         ) | ||||||
|  |                     ) | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         return sources | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     private data class ResponseSource( | ||||||
|  |         @JsonProperty("streamUrl") val streamUrl: String, | ||||||
|  |         @JsonProperty("nodeName") val nodeName: String | ||||||
|  |     ) | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | @ -1,23 +1,22 @@ | ||||||
| package com.lagradost.cloudstream3.movieproviders | package com.lagradost.cloudstream3.movieproviders | ||||||
| 
 | 
 | ||||||
| import com.lagradost.cloudstream3.* | import com.lagradost.cloudstream3.* | ||||||
| import com.lagradost.cloudstream3.mvvm.logError |  | ||||||
| import com.lagradost.cloudstream3.utils.ExtractorLink | import com.lagradost.cloudstream3.utils.ExtractorLink | ||||||
| import com.lagradost.cloudstream3.utils.httpsify |  | ||||||
| import com.lagradost.cloudstream3.utils.loadExtractor | import com.lagradost.cloudstream3.utils.loadExtractor | ||||||
| import org.jsoup.Jsoup | import org.jsoup.Jsoup | ||||||
| import org.jsoup.nodes.Element | import org.jsoup.nodes.Element | ||||||
| import java.util.* | import java.util.* | ||||||
| 
 | 
 | ||||||
| class LayarKaca21Provider : MainAPI() { | class LayarKacaProvider : MainAPI() { | ||||||
|     override var mainUrl = "https://149.56.24.226/" |     override var mainUrl = "https://149.56.24.226" | ||||||
|     override var name = "LayarKaca21" |     override var name = "LayarKaca" | ||||||
|     override val hasMainPage = true |     override val hasMainPage = true | ||||||
|     override val lang = "id" |     override val lang = "id" | ||||||
|     override val hasDownloadSupport = true |     override val hasDownloadSupport = true | ||||||
|     override val supportedTypes = setOf( |     override val supportedTypes = setOf( | ||||||
|         TvType.Movie, |         TvType.Movie, | ||||||
|         TvType.TvSeries, |         TvType.TvSeries, | ||||||
|  |         TvType.AsianDrama | ||||||
|     ) |     ) | ||||||
| 
 | 
 | ||||||
|     override suspend fun getMainPage(): HomePageResponse { |     override suspend fun getMainPage(): HomePageResponse { | ||||||
|  |  | ||||||
|  | @ -20,6 +20,8 @@ class RebahinProvider : MainAPI() { | ||||||
|     override val supportedTypes = setOf( |     override val supportedTypes = setOf( | ||||||
|         TvType.Movie, |         TvType.Movie, | ||||||
|         TvType.TvSeries, |         TvType.TvSeries, | ||||||
|  |         TvType.Anime, | ||||||
|  |         TvType.AsianDrama | ||||||
|     ) |     ) | ||||||
| 
 | 
 | ||||||
|     override suspend fun getMainPage(): HomePageResponse { |     override suspend fun getMainPage(): HomePageResponse { | ||||||
|  | @ -168,6 +170,7 @@ class RebahinProvider : MainAPI() { | ||||||
|     private suspend fun invokeLokalSource( |     private suspend fun invokeLokalSource( | ||||||
|         url: String, |         url: String, | ||||||
|         name: String, |         name: String, | ||||||
|  |         ref: String, | ||||||
|         subCallback: (SubtitleFile) -> Unit, |         subCallback: (SubtitleFile) -> Unit, | ||||||
|         sourceCallback: (ExtractorLink) -> Unit |         sourceCallback: (ExtractorLink) -> Unit | ||||||
|     ) { |     ) { | ||||||
|  | @ -182,11 +185,21 @@ class RebahinProvider : MainAPI() { | ||||||
|             if (script.data().contains("sources: [")) { |             if (script.data().contains("sources: [")) { | ||||||
|                 val source = tryParseJson<ResponseLocal>( |                 val source = tryParseJson<ResponseLocal>( | ||||||
|                     script.data().substringAfter("sources: [").substringBefore("],")) |                     script.data().substringAfter("sources: [").substringBefore("],")) | ||||||
|                 M3u8Helper.generateM3u8( |                 val m3uData = app.get(source!!.file, referer = ref).text | ||||||
|                     name, |                 val quality = Regex("\\d{3,4}\\.m3u8").findAll(m3uData).map { it.value }.toList() | ||||||
|                     source!!.file, | 
 | ||||||
|                     "http://172.96.161.72", |                 quality.forEach { | ||||||
|                 ).forEach(sourceCallback) |                     sourceCallback.invoke( | ||||||
|  |                         ExtractorLink( | ||||||
|  |                             source = name, | ||||||
|  |                             name = name, | ||||||
|  |                             url = source.file.replace("video.m3u8", it), | ||||||
|  |                             referer = ref, | ||||||
|  |                             quality = getQualityFromName("${it.replace(".m3u8", "")}p"), | ||||||
|  |                             isM3u8 = true | ||||||
|  |                         ) | ||||||
|  |                     ) | ||||||
|  |                 } | ||||||
| 
 | 
 | ||||||
|                 val trackJson = script.data().substringAfter("tracks: [").substringBefore("],") |                 val trackJson = script.data().substringAfter("tracks: [").substringBefore("],") | ||||||
|                 val track = tryParseJson<List<Tracks>>("[$trackJson]") |                 val track = tryParseJson<List<Tracks>>("[$trackJson]") | ||||||
|  | @ -291,6 +304,7 @@ class RebahinProvider : MainAPI() { | ||||||
|                     it.startsWith("http://172.96.161.72") -> invokeLokalSource( |                     it.startsWith("http://172.96.161.72") -> invokeLokalSource( | ||||||
|                         it, |                         it, | ||||||
|                         this.name, |                         this.name, | ||||||
|  |                         "http://172.96.161.72/", | ||||||
|                         subtitleCallback, |                         subtitleCallback, | ||||||
|                         callback |                         callback | ||||||
|                     ) |                     ) | ||||||
|  |  | ||||||
|  | @ -190,6 +190,7 @@ val extractorApis: Array<ExtractorApi> = arrayOf( | ||||||
|     GMPlayer(), |     GMPlayer(), | ||||||
| 
 | 
 | ||||||
|     Blogger(), |     Blogger(), | ||||||
|  |     Solidfiles(), | ||||||
| 
 | 
 | ||||||
|     Hxfile(), |     Hxfile(), | ||||||
|     KotakAnimeid(), |     KotakAnimeid(), | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue