├── .vscode └── settings.json ├── SuperVod ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── horis │ │ └── cloudstreamplugins │ │ ├── providers │ │ ├── HaiwaikanProvider.kt │ │ └── JiangNanProvider.kt │ │ ├── VodExtractor.kt │ │ ├── UAPIProvider.kt │ │ ├── apiextractors │ │ ├── VodAPIExtractor.kt │ │ ├── CollectAPIExtractor.kt │ │ └── CollectXMLExtractor.kt │ │ ├── apis │ │ ├── VodAPI.kt │ │ └── CollectAPI.kt │ │ ├── Entities.kt │ │ ├── UAPIXMLProvider.kt │ │ └── Utils.kt └── build.gradle.kts ├── BaseProvider ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ ├── com │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── StringExtensions.kt │ │ │ ├── BasePlugin.kt │ │ │ ├── SearchRule.kt │ │ │ ├── MainPageRule.kt │ │ │ └── LoadRule.kt │ │ └── LoadRule.kt └── build.gradle.kts ├── DdysProvider ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── horis │ │ └── cloudstreamplugins │ │ ├── DdysPlugin.kt │ │ └── Utils.kt └── build.gradle.kts ├── LibvioProvider ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── horis │ │ └── cloudstreamplugins │ │ ├── LibvioPlugin.kt │ │ ├── VodExtractor.kt │ │ └── Utils.kt └── build.gradle.kts ├── YjysProvider ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── horis │ │ └── cloudstreamplugins │ │ ├── YjysPlugin.kt │ │ ├── CfBypass.kt │ │ ├── GzipUtil.kt │ │ ├── Utils.kt │ │ └── ZlibUtil.kt └── build.gradle.kts ├── ZxzjProvider ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── horis │ │ └── cloudstreamplugins │ │ ├── ZxzjPlugin.kt │ │ ├── VodExtractor.kt │ │ └── Utils.kt └── build.gradle.kts ├── DramacoolProvider ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── horis │ │ └── cloudstreamplugins │ │ ├── DramacoolPlugin.kt │ │ ├── Vidstream2.kt │ │ └── DramacoolProvider.kt └── build.gradle.kts ├── MxplayerProvider ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── horis │ │ └── cloudstreamplugins │ │ ├── MxplayerPlugin.kt │ │ ├── Utils.kt │ │ └── entities.kt └── build.gradle.kts ├── archived ├── AnimehubProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── AnimehubPlugin.kt │ │ │ ├── Vidstream2.kt │ │ │ └── AnimehubProvider.kt │ └── build.gradle.kts ├── CzzyProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── CzzyPlugin.kt │ │ │ ├── VodExtractor.kt │ │ │ └── Utils.kt │ └── build.gradle.kts ├── Kshow123Provider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── Kshow123Plugin.kt │ │ │ ├── Vidstream2.kt │ │ │ ├── StreamSB.kt │ │ │ └── Kshow123Provider.kt │ └── build.gradle.kts ├── Movie123Provider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── Movie123Plugin.kt │ │ │ └── Utils.kt │ └── build.gradle.kts ├── NivodProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── NivodPlugin.kt │ │ │ ├── entities.kt │ │ │ └── Utils.kt │ └── build.gradle.kts ├── OulevodProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── OulevodPlugin.kt │ │ │ └── OulevodProvider.kt │ └── build.gradle.kts ├── PaheProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── PahePlugin.kt │ │ │ └── Utils.kt │ └── build.gradle.kts ├── Stream1Provider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── Stream1Plugin.kt │ │ │ ├── Utils.kt │ │ │ └── Stream1Provider.kt │ └── build.gradle.kts ├── YaNaiFeiProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── YaNaiFeiPlugin.kt │ │ │ ├── VodExtractor.kt │ │ │ └── Utils.kt │ └── build.gradle.kts ├── AnimexinaxProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── AnimexinaxPlugin.kt │ │ │ ├── Utils.kt │ │ │ ├── Dailymotion.kt │ │ │ └── AnimexinaxProvider.kt │ └── build.gradle.kts ├── BollywoodProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── TMDBData.kt │ │ │ ├── HollywoodProvider.kt │ │ │ ├── TMDBResult.kt │ │ │ ├── BollywoodPlugin.kt │ │ │ ├── CryptoJs.kt │ │ │ ├── Utils.kt │ │ │ ├── AlphanumComparator.kt │ │ │ └── TGArchiveProvider.kt │ └── build.gradle.kts ├── DamixingqiuProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── DmxqPlugin.kt │ │ │ └── VodExtractor.kt │ └── build.gradle.kts ├── DesicinemasProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── DesicinemasPlugin.kt │ │ │ ├── Tvlogy.kt │ │ │ ├── Tellygossips.kt │ │ │ ├── BollyzoneProvider.kt │ │ │ ├── Utils.kt │ │ │ └── DesicinemasProvider.kt │ └── build.gradle.kts ├── NetflixMirrorProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── entities │ │ │ ├── PlayList.kt │ │ │ ├── SearchResult.kt │ │ │ ├── Source.kt │ │ │ ├── PlayListItem.kt │ │ │ ├── Season.kt │ │ │ ├── SearchData.kt │ │ │ ├── EpisodesData.kt │ │ │ ├── Episode.kt │ │ │ └── PostData.kt │ │ │ ├── NetflixMirrorPlugin.kt │ │ │ └── Utils.kt │ └── build.gradle.kts ├── PiousIndexProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── PiousIndexPlugin.kt │ │ │ └── Utils.kt │ └── build.gradle.kts ├── RainostreamProvider │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── horis │ │ │ └── cloudstreamplugins │ │ │ ├── RainostreamPlugin.kt │ │ │ ├── entities.kt │ │ │ └── Utils.kt │ └── build.gradle.kts └── SockshareProvider │ ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── horis │ │ └── cloudstreamplugins │ │ ├── SocksharePlugin.kt │ │ ├── Eplayvid.kt │ │ └── Utils.kt │ └── build.gradle.kts ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle.kts ├── gradle.properties ├── .github └── workflows │ └── build.yml └── gradlew.bat /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "interactive" 3 | } -------------------------------------------------------------------------------- /SuperVod/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /BaseProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DdysProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /LibvioProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /YjysProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ZxzjProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DramacoolProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /MxplayerProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/AnimehubProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/CzzyProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/Kshow123Provider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/Movie123Provider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/NivodProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/OulevodProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/PaheProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/Stream1Provider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/YaNaiFeiProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/AnimexinaxProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/BollywoodProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/DamixingqiuProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/DesicinemasProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/PiousIndexProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/RainostreamProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /archived/SockshareProvider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/821938089/cloudstream-extensions/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | **/build 8 | /captures 9 | .externalNativeBuild 10 | .cxx 11 | local.properties 12 | .vscode -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities/PlayList.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.entities 2 | 3 | class PlayList : ArrayList() 4 | -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities/SearchResult.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.entities 2 | 3 | data class SearchResult( 4 | val id: String, 5 | val t: String 6 | ) 7 | -------------------------------------------------------------------------------- /BaseProvider/src/main/kotlin/com/horis/cloudstreamplugins/StringExtensions.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | fun String.substring(left: String, right: String): String { 4 | return substringAfter(left).substringBefore(right) 5 | } 6 | -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities/Source.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.entities 2 | 3 | data class Source( 4 | val file: String, 5 | val label: String, 6 | val type: String 7 | ) 8 | -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities/PlayListItem.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.entities 2 | 3 | data class PlayListItem( 4 | val image: String, 5 | val sources: List, 6 | val title: String 7 | ) 8 | -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities/Season.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.entities 2 | 3 | data class Season( 4 | val ep: String, 5 | val id: String, 6 | val s: String, 7 | val sele: String 8 | ) 9 | -------------------------------------------------------------------------------- /archived/BollywoodProvider/src/main/kotlin/com/horis/cloudstreamplugins/TMDBData.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | data class TMDBData( 4 | val page: Int, 5 | val results: List, 6 | val total_pages: Int, 7 | val total_results: Int 8 | ) 9 | -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities/SearchData.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.entities 2 | 3 | data class SearchData( 4 | val head: String, 5 | val searchResult: List, 6 | val type: Int 7 | ) 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Feb 20 16:26:11 CET 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities/EpisodesData.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.entities 2 | 3 | data class EpisodesData( 4 | val episodes: List?, 5 | val nextPage: Int, 6 | val nextPageSeason: String, 7 | val nextPageShow: Int, 8 | ) 9 | -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities/Episode.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.entities 2 | 3 | data class Episode( 4 | val complate: String, 5 | val ep: String, 6 | val id: String, 7 | val s: String, 8 | val t: String, 9 | val time: String 10 | ) 11 | -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities/PostData.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.entities 2 | 3 | data class PostData( 4 | val desc: String?, 5 | val director: String?, 6 | val episodes: List, 7 | val genre: String?, 8 | val nextPage: Int?, 9 | val nextPageSeason: String?, 10 | val nextPageShow: Int?, 11 | val season: List?, 12 | val title: String, 13 | val year: String 14 | ) 15 | -------------------------------------------------------------------------------- /DdysProvider/src/main/kotlin/com/horis/cloudstreamplugins/DdysPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class DdysPlugin: Plugin() { 9 | override fun load(context: Context) { 10 | // All providers should be added in this manner. Please don't edit the providers list directly. 11 | registerMainAPI(DdysProvider()) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /BaseProvider/src/main/kotlin/com/horis/cloudstreamplugins/BasePlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class BasePlugin: Plugin() { 9 | override fun load(context: Context) { 10 | // All providers should be added in this manner. Please don't edit the providers list directly. 11 | // registerMainAPI(BaseProvider()) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /LibvioProvider/src/main/kotlin/com/horis/cloudstreamplugins/LibvioPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class LibvioPlugin: Plugin() { 9 | override fun load(context: Context) { 10 | // All providers should be added in this manner. Please don't edit the providers list directly. 11 | registerMainAPI(LibvioProvider()) 12 | } 13 | } -------------------------------------------------------------------------------- /YjysProvider/src/main/kotlin/com/horis/cloudstreamplugins/YjysPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class YjysPlugin : Plugin() { 9 | 10 | override fun load(context: Context) { 11 | // All providers should be added in this manner. Please don't edit the providers list directly. 12 | registerMainAPI(YjysProvider()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ZxzjProvider/src/main/kotlin/com/horis/cloudstreamplugins/ZxzjPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class ZxzjPlugin : Plugin() { 9 | 10 | override fun load(context: Context) { 11 | // All providers should be added in this manner. Please don't edit the providers list directly. 12 | registerMainAPI(ZxzjProvider()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /archived/DamixingqiuProvider/src/main/kotlin/com/horis/cloudstreamplugins/DmxqPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class DmxqPlugin: Plugin() { 9 | override fun load(context: Context) { 10 | // All providers should be added in this manner. Please don't edit the providers list directly. 11 | registerMainAPI(DmxqProvider()) 12 | } 13 | } -------------------------------------------------------------------------------- /archived/OulevodProvider/src/main/kotlin/com/horis/cloudstreamplugins/OulevodPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class OulevodPlugin: Plugin() { 9 | override fun load(context: Context) { 10 | // All providers should be added in this manner. Please don't edit the providers list directly. 11 | registerMainAPI(OulevodProvider()) 12 | } 13 | } -------------------------------------------------------------------------------- /archived/CzzyProvider/src/main/kotlin/com/horis/cloudstreamplugins/CzzyPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class CzzyPlugin : Plugin() { 9 | 10 | override fun load(context: Context) { 11 | // All providers should be added in this manner. Please don't edit the providers list directly. 12 | registerMainAPI(CzzyProvider()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /archived/NivodProvider/src/main/kotlin/com/horis/cloudstreamplugins/NivodPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class NivodPlugin : Plugin() { 9 | 10 | override fun load(context: Context) { 11 | // All providers should be added in this manner. Please don't edit the providers list directly. 12 | registerMainAPI(NivodProvider()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /archived/YaNaiFeiProvider/src/main/kotlin/com/horis/cloudstreamplugins/YaNaiFeiPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class YaNaiFeiPlugin: Plugin() { 9 | override fun load(context: Context) { 10 | // All providers should be added in this manner. Please don't edit the providers list directly. 11 | registerMainAPI(YaNaiFeiProvider()) 12 | } 13 | } -------------------------------------------------------------------------------- /MxplayerProvider/src/main/kotlin/com/horis/cloudstreamplugins/MxplayerPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class MxplayerPlugin : Plugin() { 9 | override fun load(context: Context) { 10 | // All providers should be added in this manner. Please don't edit the providers list directly. 11 | registerMainAPI(MxplayerProvider()) 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /archived/Stream1Provider/src/main/kotlin/com/horis/cloudstreamplugins/Stream1Plugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class Stream1Plugin: Plugin() { 9 | override fun load(context: Context) { 10 | // All providers should be added in this manner. Please don't edit the providers list directly. 11 | registerMainAPI(Stream1Provider()) 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /archived/PiousIndexProvider/src/main/kotlin/com/horis/cloudstreamplugins/PiousIndexPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class PiousIndexPlugin : Plugin() { 9 | override fun load(context: Context) { 10 | // All providers should be added in this manner. Please don't edit the providers list directly. 11 | registerMainAPI(PiousIndexProvider()) 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /archived/RainostreamProvider/src/main/kotlin/com/horis/cloudstreamplugins/RainostreamPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class RainostreamPlugin: Plugin() { 9 | override fun load(context: Context) { 10 | // All providers should be added in this manner. Please don't edit the providers list directly. 11 | registerMainAPI(RainostreamProvider()) 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/NetflixMirrorPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | 7 | @CloudstreamPlugin 8 | class NetflixMirrorPlugin: Plugin() { 9 | override fun load(context: Context) { 10 | // All providers should be added in this manner. Please don't edit the providers list directly. 11 | registerMainAPI(NetflixMirrorProvider()) 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /BaseProvider/src/main/kotlin/LoadRule.kt: -------------------------------------------------------------------------------- 1 | import com.lagradost.cloudstream3.SearchQuality 2 | import com.lagradost.cloudstream3.TvType 3 | 4 | open class LoadRule( 5 | val list: String, 6 | val title: String, 7 | val url: String, 8 | val posterUrl: String? = null, 9 | val posterHeaders: Map = mapOf(), 10 | val year: String? = null, 11 | val type: String? = null, 12 | val quality: String? = null, 13 | ) { 14 | open fun getType(type: String): TvType? = null 15 | open fun getQuality(quality: String): SearchQuality? = null 16 | open fun getYear(year: String): String? = null 17 | } -------------------------------------------------------------------------------- /BaseProvider/src/main/kotlin/com/horis/cloudstreamplugins/SearchRule.kt: -------------------------------------------------------------------------------- 1 | package com.lagradost.cloudstream3.cloudstreamplugins 2 | 3 | import com.lagradost.nicehttp.NiceResponse 4 | 5 | open class SearchRule( 6 | val list: String? = null, 7 | val url: String? = null, 8 | val name: String? = null, 9 | val posterUrl: String? = null 10 | ) { 11 | open fun getList(list: List<*>?, res: NiceResponse) = list 12 | open fun getUrl(url: String?, res: NiceResponse) = url 13 | open fun getName(name: String?, res: NiceResponse) = name 14 | open fun getPosterUrl(posterUrl: String?, res: NiceResponse) = posterUrl 15 | } 16 | -------------------------------------------------------------------------------- /archived/Stream1Provider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 2 3 | 4 | 5 | cloudstream { 6 | language = "en" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "Live", 22 | ) 23 | 24 | iconUrl = "https://www.google.com/s2/favicons?domain=1stream.eu&sz=%size%" 25 | } 26 | -------------------------------------------------------------------------------- /DramacoolProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 4 3 | 4 | 5 | cloudstream { 6 | language = "en" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "AsianDrama", 22 | ) 23 | 24 | iconUrl = "https://www.google.com/s2/favicons?domain=dramacool.city&sz=%size%" 25 | } 26 | -------------------------------------------------------------------------------- /archived/BollywoodProvider/src/main/kotlin/com/horis/cloudstreamplugins/HollywoodProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.mainPageOf 4 | 5 | class HollywoodProvider : BollywoodProvider() { 6 | override var lang = "en" 7 | 8 | override var mainUrl = "https://hollywood.eu.org" 9 | override var name = "Hollywood" 10 | 11 | override val api = "https://simpleprogramenglishapi.zindex.eu.org" 12 | 13 | override val mainPage = mainPageOf( 14 | "$api/0:/Hollywood.English/" to "Hollywood English Movies", 15 | "$api/0:/Web.Series.English/" to "Web Series English", 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /archived/RainostreamProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 2 3 | 4 | 5 | cloudstream { 6 | language = "en" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "Live", 22 | ) 23 | 24 | iconUrl = "https://www.google.com/s2/favicons?domain=rainostreams.com&sz=%size%" 25 | } 26 | -------------------------------------------------------------------------------- /archived/Kshow123Provider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 2 3 | 4 | 5 | cloudstream { 6 | language = "en" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "AsianDrama", 22 | ) 23 | 24 | iconUrl = "https://www.google.com/s2/favicons?domain=kshow123online.com&sz=%size%" 25 | } 26 | -------------------------------------------------------------------------------- /archived/Movie123Provider/src/main/kotlin/com/horis/cloudstreamplugins/Movie123Plugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.extractorApis 8 | 9 | @CloudstreamPlugin 10 | class Movie123Plugin: Plugin() { 11 | override fun load(context: Context) { 12 | // All providers should be added in this manner. Please don't edit the providers list directly. 13 | registerMainAPI(Movie123Provider()) 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /archived/Movie123Provider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 8 3 | 4 | 5 | cloudstream { 6 | language = "en" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 0 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "Movie", 22 | "TvSeries" 23 | ) 24 | 25 | iconUrl = "https://www.google.com/s2/favicons?domain=ww1.new-movies123.co&sz=%size%" 26 | } 27 | -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 2 3 | 4 | 5 | cloudstream { 6 | language = "en" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 0 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "Movie", 22 | "TvSeries" 23 | ) 24 | 25 | iconUrl = "https://www.google.com/s2/favicons?domain=m.netflixmirror.com&sz=%size%" 26 | } 27 | -------------------------------------------------------------------------------- /archived/PiousIndexProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 1 3 | 4 | 5 | cloudstream { 6 | language = "en" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 0 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "Movie", 22 | "TvSeries", 23 | ) 24 | 25 | iconUrl = "https://cdn.jsdelivr.net/npm/@googledrive/index@2.0.20/images/favicon.ico" 26 | 27 | } 28 | -------------------------------------------------------------------------------- /archived/DesicinemasProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 4 3 | 4 | 5 | cloudstream { 6 | language = "hi" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "Movie", 22 | ) 23 | 24 | iconUrl = "https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://desicinemas.tv&size=%size%" 25 | } 26 | -------------------------------------------------------------------------------- /MxplayerProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 3 3 | 4 | 5 | cloudstream { 6 | language = "hi" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Watch MX player contents on cloudstream" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "AsianDrama", 22 | "TvSeries", 23 | "Movie", 24 | ) 25 | 26 | iconUrl = "https://www.google.com/s2/favicons?domain=www.mxplayer.in&sz=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /archived/PaheProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 2 3 | 4 | 5 | cloudstream { 6 | language = "en" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "Movie", 22 | "TvSeries", 23 | ) 24 | 25 | iconUrl = "https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://pahe.sbs&size=%size%" 26 | } 27 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.name = "CloudstreamPlugins" 2 | 3 | // This file sets what projects are included. All new projects should get automatically included unless specified in "disabled" variable. 4 | 5 | val disabled = listOf("BaseProvider") 6 | 7 | File(rootDir, ".").eachDir { dir -> 8 | if (!disabled.contains(dir.name) && File(dir, "build.gradle.kts").exists()) { 9 | include(dir.name) 10 | } 11 | } 12 | 13 | fun File.eachDir(block: (File) -> Unit) { 14 | listFiles()?.filter { it.isDirectory }?.forEach { block(it) } 15 | } 16 | 17 | 18 | // To only include a single project, comment out the previous lines (except the first one), and include your plugin like so: 19 | // include("PluginName") 20 | -------------------------------------------------------------------------------- /archived/BollywoodProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 27 3 | 4 | 5 | cloudstream { 6 | language = "hi" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "Movie", 22 | "TvSeries", 23 | ) 24 | 25 | iconUrl = "https://cdn.jsdelivr.net/npm/@googledrive/index@2.0.20/images/favicon.ico" 26 | 27 | // requiresResources = true 28 | } 29 | -------------------------------------------------------------------------------- /archived/SockshareProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 2 3 | 4 | 5 | cloudstream { 6 | language = "en" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "TvSeries", 22 | "Movie", 23 | ) 24 | 25 | iconUrl = "https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://sockshare.ac&size=%size%" 26 | } 27 | -------------------------------------------------------------------------------- /archived/RainostreamProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | 4 | data class PEEvents( 5 | val events: List 6 | ) 7 | 8 | 9 | data class PEEvent( 10 | val __v: Int, 11 | val _id: String, 12 | val compitition: String, 13 | val kickOff: String, 14 | val status: String, 15 | val stream: String, 16 | val title: String 17 | ) 18 | 19 | data class RugbyGames( 20 | val game: List 21 | ) 22 | 23 | data class RugbyGame( 24 | val away_team_name: String, 25 | val date: String, 26 | val home_team_name: String, 27 | val id: Int, 28 | val stream: String, 29 | val time: String, 30 | val tournaments: String 31 | ) 32 | -------------------------------------------------------------------------------- /BaseProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 1 3 | 4 | 5 | cloudstream { 6 | // All of these properties are optional, you can safely remove them 7 | language = "zh" 8 | 9 | // authors = listOf("Cloudburst") 10 | 11 | /** 12 | * Status int as the following: 13 | * 0: Down 14 | * 1: Ok 15 | * 2: Slow 16 | * 3: Beta only 17 | * */ 18 | status = 1 // will be 3 if unspecified 19 | 20 | // List of video source types. Users are able to filter for extensions in a given category. 21 | // You can find a list of avaliable types here: 22 | // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html 23 | tvTypes = listOf("Others") 24 | } -------------------------------------------------------------------------------- /YjysProvider/src/main/kotlin/com/horis/cloudstreamplugins/CfBypass.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.network.CloudflareKiller 4 | import okhttp3.Interceptor 5 | import okhttp3.Response 6 | import org.jsoup.Jsoup 7 | 8 | class CfBypass(private val cloudflareKiller: CloudflareKiller): Interceptor { 9 | override fun intercept(chain: Interceptor.Chain): Response { 10 | val request = chain.request() 11 | val response = chain.proceed(request) 12 | val doc = Jsoup.parse(response.peekBody(1024 * 1024).string()) 13 | if (doc.select("title").text() == "Just a moment...") { 14 | return cloudflareKiller.intercept(chain) 15 | } 16 | return response 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /archived/AnimehubProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 3 3 | 4 | 5 | cloudstream { 6 | language = "en" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "AnimeMovie", 22 | "Anime", 23 | "OVA", 24 | ) 25 | 26 | iconUrl = "https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://123animehub.cc&size=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /archived/AnimexinaxProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 2 3 | 4 | 5 | cloudstream { 6 | language = "en" 7 | // All of these properties are optional, you can safely remove them 8 | 9 | // description = "Lorem Ipsum" 10 | authors = listOf("Horis") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | tvTypes = listOf( 21 | "AnimeMovie", 22 | "Anime", 23 | "OVA", 24 | ) 25 | 26 | iconUrl = "https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://animexinax.com&size=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /archived/PaheProvider/src/main/kotlin/com/horis/cloudstreamplugins/PahePlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.extractorApis 8 | 9 | @CloudstreamPlugin 10 | class PahePlugin: Plugin() { 11 | override fun load(context: Context) { 12 | // All providers should be added in this manner. Please don't edit the providers list directly. 13 | registerMainAPI(PaheProvider()) 14 | } 15 | 16 | private fun addExtractor(element: ExtractorApi) { 17 | element.sourcePlugin = __filename 18 | extractorApis.add(0, element) 19 | } 20 | } 21 | 22 | 23 | -------------------------------------------------------------------------------- /BaseProvider/src/main/kotlin/com/horis/cloudstreamplugins/MainPageRule.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.cloudstreamplugins.SearchRule 4 | import com.lagradost.nicehttp.NiceResponse 5 | 6 | open class MainPageRule( 7 | val list: String? = null, 8 | val url: String? = null, 9 | val name: String? = null, 10 | val posterUrl: String? = null 11 | ) { 12 | open fun getList(list: List<*>?, res: NiceResponse) = list 13 | open fun getUrl(url: String?, res: NiceResponse) = url 14 | open fun getName(name: String?, res: NiceResponse) = name 15 | open fun getPosterUrl(posterUrl: String?, res: NiceResponse) = posterUrl 16 | 17 | fun toSearchRule() = SearchRule( 18 | list, 19 | url, 20 | name, 21 | posterUrl 22 | ) 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/providers/HaiwaikanProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.providers 2 | 3 | import com.horis.cloudstreamplugins.BaseVodProvider 4 | import com.lagradost.cloudstream3.ErrorLoadingException 5 | import com.lagradost.cloudstream3.SearchResponse 6 | 7 | 8 | class HaiwaikanProvider : BaseVodProvider() { 9 | 10 | override var mainUrl = "http://api.haiwaikan.com/v1/vod" 11 | override var name = "海外看影视" 12 | override val playFromFilter = hashSetOf("haiwaikan") 13 | 14 | override suspend fun search(query: String): List? { 15 | val vodList = apiExtractor.getVodList(query = query) 16 | ?: throw ErrorLoadingException("获取搜索数据失败") 17 | val ids = vodList.map { it.id }.joinToString(",") 18 | return super.search(ids) 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /archived/SockshareProvider/src/main/kotlin/com/horis/cloudstreamplugins/SocksharePlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.extractorApis 8 | 9 | @CloudstreamPlugin 10 | class SocksharePlugin: Plugin() { 11 | override fun load(context: Context) { 12 | // All providers should be added in this manner. Please don't edit the providers list directly. 13 | registerMainAPI(SockshareProvider()) 14 | addExtractor(Eplayvid()) 15 | } 16 | 17 | private fun addExtractor(element: ExtractorApi) { 18 | element.sourcePlugin = __filename 19 | extractorApis.add(0, element) 20 | } 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /archived/AnimexinaxProvider/src/main/kotlin/com/horis/cloudstreamplugins/AnimexinaxPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.extractorApis 8 | 9 | @CloudstreamPlugin 10 | class AnimexinaxPlugin: Plugin() { 11 | override fun load(context: Context) { 12 | // All providers should be added in this manner. Please don't edit the providers list directly. 13 | registerMainAPI(AnimexinaxProvider()) 14 | addExtractor(Dailymotion()) 15 | } 16 | 17 | private fun addExtractor(element: ExtractorApi) { 18 | element.sourcePlugin = __filename 19 | extractorApis.add(0, element) 20 | } 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /DramacoolProvider/src/main/kotlin/com/horis/cloudstreamplugins/DramacoolPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.extractorApis 8 | 9 | @CloudstreamPlugin 10 | class DramacoolPlugin: Plugin() { 11 | override fun load(context: Context) { 12 | // All providers should be added in this manner. Please don't edit the providers list directly. 13 | registerMainAPI(DramacoolProvider()) 14 | addExtractor(Vidstream2("https://asianembed.io")) 15 | } 16 | 17 | private fun addExtractor(element: ExtractorApi) { 18 | element.sourcePlugin = __filename 19 | extractorApis.add(0, element) 20 | } 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/VodExtractor.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.base64Decode 4 | import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson 5 | import org.jsoup.Jsoup 6 | import org.jsoup.nodes.Document 7 | 8 | class VodExtractor(html: String) { 9 | private val doc: Document = Jsoup.parse(html) 10 | 11 | fun getPlayUrl(): String? { 12 | val playerInfoJSON = doc.select("script").firstOrNull { 13 | it.data().contains("var player_aaaa=") 14 | }?.data()?.substringAfter("var player_aaaa=") 15 | val playerInfo = tryParseJson(playerInfoJSON) ?: return null 16 | return when (playerInfo.encrypt) { 17 | 1 -> unescape(playerInfo.url!!) 18 | 2 -> unescape(base64Decode(playerInfo.url!!)) 19 | else /* 0 */ -> playerInfo.url 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /DdysProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 2 3 | 4 | 5 | cloudstream { 6 | // All of these properties are optional, you can safely remove them 7 | language = "zh" 8 | 9 | // description = "Lorem Ipsum" 10 | // authors = listOf("Cloudburst") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | 21 | // List of video source types. Users are able to filter for extensions in a given category. 22 | // You can find a list of avaliable types here: 23 | // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html 24 | tvTypes = listOf("Movie", "AnimeMovie", "TvSeries", "Anime", "AsianDrama", "Others") 25 | 26 | iconUrl = "https://www.google.com/s2/favicons?domain=ddys.tv&sz=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /archived/Kshow123Provider/src/main/kotlin/com/horis/cloudstreamplugins/Kshow123Plugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.extractorApis 8 | 9 | @CloudstreamPlugin 10 | class Kshow123Plugin: Plugin() { 11 | override fun load(context: Context) { 12 | // All providers should be added in this manner. Please don't edit the providers list directly. 13 | registerMainAPI(Kshow123Provider()) 14 | addExtractor(Vidstream2("https://asianplay.pro")) 15 | addExtractor(Streamsss()) 16 | } 17 | 18 | private fun addExtractor(element: ExtractorApi) { 19 | element.sourcePlugin = __filename 20 | extractorApis.add(0, element) 21 | } 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /LibvioProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 8 3 | 4 | 5 | cloudstream { 6 | // All of these properties are optional, you can safely remove them 7 | language = "zh" 8 | 9 | // description = "Lorem Ipsum" 10 | // authors = listOf("Cloudburst") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | 21 | // List of video source types. Users are able to filter for extensions in a given category. 22 | // You can find a list of avaliable types here: 23 | // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html 24 | tvTypes = listOf("Movie", "AnimeMovie", "TvSeries", "Anime", "AsianDrama", "Others") 25 | 26 | iconUrl = "https://www.google.com/s2/favicons?domain=www.libvio.me&sz=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /YjysProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 1 3 | 4 | 5 | cloudstream { 6 | // All of these properties are optional, you can safely remove them 7 | language = "zh" 8 | 9 | // description = "Lorem Ipsum" 10 | // authors = listOf("Cloudburst") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | 21 | // List of video source types. Users are able to filter for extensions in a given category. 22 | // You can find a list of avaliable types here: 23 | // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html 24 | tvTypes = listOf("Movie", "AnimeMovie", "TvSeries", "Anime", "AsianDrama", "Others") 25 | 26 | iconUrl = "https://www.google.com/s2/favicons?domain=www.yjys02.com&sz=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /ZxzjProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 1 3 | 4 | 5 | cloudstream { 6 | // All of these properties are optional, you can safely remove them 7 | language = "zh" 8 | 9 | // description = "Lorem Ipsum" 10 | // authors = listOf("Cloudburst") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | 21 | // List of video source types. Users are able to filter for extensions in a given category. 22 | // You can find a list of avaliable types here: 23 | // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html 24 | tvTypes = listOf("Movie", "AnimeMovie", "TvSeries", "Anime", "AsianDrama", "Others") 25 | 26 | iconUrl = "https://www.google.com/s2/favicons?domain=www.zxzj.pro&sz=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /archived/CzzyProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 1 3 | 4 | 5 | cloudstream { 6 | // All of these properties are optional, you can safely remove them 7 | language = "zh" 8 | 9 | // description = "Lorem Ipsum" 10 | // authors = listOf("Cloudburst") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | 21 | // List of video source types. Users are able to filter for extensions in a given category. 22 | // You can find a list of avaliable types here: 23 | // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html 24 | tvTypes = listOf("Movie", "AnimeMovie", "TvSeries", "Anime", "AsianDrama", "Others") 25 | 26 | iconUrl = "https://www.google.com/s2/favicons?domain=www.czys.pro&sz=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /archived/NivodProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 2 3 | 4 | 5 | cloudstream { 6 | // All of these properties are optional, you can safely remove them 7 | language = "zh" 8 | 9 | // description = "Lorem Ipsum" 10 | // authors = listOf("Cloudburst") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | 21 | // List of video source types. Users are able to filter for extensions in a given category. 22 | // You can find a list of avaliable types here: 23 | // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html 24 | tvTypes = listOf("Movie", "AnimeMovie", "TvSeries", "Anime", "AsianDrama", "Others") 25 | 26 | iconUrl = "https://www.google.com/s2/favicons?domain=www.nivod.tv&sz=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /archived/DamixingqiuProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 1 3 | 4 | 5 | cloudstream { 6 | // All of these properties are optional, you can safely remove them 7 | language = "zh" 8 | 9 | // description = "Lorem Ipsum" 10 | // authors = listOf("Cloudburst") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | 21 | // List of video source types. Users are able to filter for extensions in a given category. 22 | // You can find a list of avaliable types here: 23 | // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html 24 | tvTypes = listOf("Movie", "AnimeMovie", "TvSeries", "Anime", "AsianDrama", "Others") 25 | 26 | iconUrl = "https://www.google.com/s2/favicons?domain=yanetflix.com&sz=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /archived/OulevodProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 4 3 | 4 | 5 | cloudstream { 6 | // All of these properties are optional, you can safely remove them 7 | language = "zh" 8 | 9 | // description = "Lorem Ipsum" 10 | // authors = listOf("Cloudburst") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | 21 | // List of video source types. Users are able to filter for extensions in a given category. 22 | // You can find a list of avaliable types here: 23 | // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html 24 | tvTypes = listOf("Movie", "AnimeMovie", "TvSeries", "Anime", "AsianDrama", "Others") 25 | 26 | iconUrl = "https://www.google.com/s2/favicons?domain=www.oulevod.tv&sz=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /archived/YaNaiFeiProvider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 3 3 | 4 | 5 | cloudstream { 6 | // All of these properties are optional, you can safely remove them 7 | language = "zh" 8 | 9 | // description = "Lorem Ipsum" 10 | // authors = listOf("Cloudburst") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 0 // will be 3 if unspecified 20 | 21 | // List of video source types. Users are able to filter for extensions in a given category. 22 | // You can find a list of avaliable types here: 23 | // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html 24 | tvTypes = listOf("Movie", "AnimeMovie", "TvSeries", "Anime", "AsianDrama", "Others") 25 | 26 | iconUrl = "https://www.google.com/s2/favicons?domain=yanetflix.com&sz=%size%" 27 | } 28 | -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/UAPIProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | import com.lagradost.cloudstream3.* 5 | 6 | abstract class UAPIProvider : BaseUAPIProvider() { 7 | 8 | override suspend fun getCategory(): List { 9 | categoryCache?.let { return it } 10 | val res = fetchApi("$mainUrl?ac=list") 11 | categoryCache = res.parsedSafe()?.list?.take(8) 12 | return categoryCache ?: throw ErrorLoadingException("获取分类数据失败 - 状态码${res.code}") 13 | } 14 | 15 | override suspend fun getVodList(url: String): List? { 16 | return fetchApi(url).parsedSafe()?.list 17 | } 18 | 19 | data class VodList( 20 | @JsonProperty("list") val list: ArrayList 21 | ) 22 | 23 | data class CategoryList( 24 | @JsonProperty("class") val list: ArrayList 25 | ) 26 | 27 | } 28 | -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/apiextractors/VodAPIExtractor.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.apiextractors 2 | 3 | import com.horis.cloudstreamplugins.Category 4 | import com.horis.cloudstreamplugins.Vod 5 | 6 | interface VodAPIExtractor { 7 | 8 | suspend fun getCategory(limit: Int = 7, skip: Int = 0): List { 9 | throw NotImplementedError() 10 | } 11 | 12 | suspend fun getVodListDetail( 13 | query: String? = null, 14 | page: Int = 0, 15 | ids: String? = null, 16 | type: String? = null, 17 | pageSize: Int? = null 18 | ): List? { 19 | throw NotImplementedError() 20 | } 21 | 22 | suspend fun getVodList( 23 | query: String? = null, 24 | page: Int = 0, 25 | ids: String? = null, 26 | type: String? = null, 27 | pageSize: Int? = null 28 | ): List? { 29 | throw NotImplementedError() 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /archived/BollywoodProvider/src/main/kotlin/com/horis/cloudstreamplugins/TMDBResult.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | data class TMDBResult( 4 | val backdrop_path: String?, 5 | val genre_ids: List?, 6 | val media_type: String?, 7 | val seasons: List?, 8 | val id: Int, 9 | val name: String?, 10 | val title: String?, 11 | val release_date: String?, 12 | val overview: String, 13 | val popularity: Double, 14 | val poster_path: String?, 15 | val vote_average: Double, 16 | val vote_count: Int 17 | ) 18 | 19 | data class Season( 20 | val id: Int, 21 | val name: String, 22 | val season_number: Int 23 | ) 24 | 25 | data class SingleEpisode( 26 | val id: Int, 27 | val name: String, 28 | val overview: String, 29 | val still_path: String?, 30 | val episode_number: Int, 31 | val season_number: Int, 32 | ) 33 | 34 | data class TMDBDetailEpisodes( 35 | val episodes: List, 36 | ) 37 | -------------------------------------------------------------------------------- /SuperVod/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // use an integer for version numbers 2 | version = 12 3 | 4 | 5 | cloudstream { 6 | // All of these properties are optional, you can safely remove them 7 | language = "zh" 8 | 9 | // description = "Lorem Ipsum" 10 | // authors = listOf("Cloudburst") 11 | 12 | /** 13 | * Status int as the following: 14 | * 0: Down 15 | * 1: Ok 16 | * 2: Slow 17 | * 3: Beta only 18 | * */ 19 | status = 1 // will be 3 if unspecified 20 | 21 | // List of video source types. Users are able to filter for extensions in a given category. 22 | // You can find a list of avaliable types here: 23 | // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html 24 | tvTypes = listOf( 25 | "Movie", 26 | "AnimeMovie", 27 | "TvSeries", 28 | "Cartoon", 29 | "Anime", 30 | "AsianDrama", 31 | "Documentary", 32 | "Others" 33 | ) 34 | 35 | } 36 | -------------------------------------------------------------------------------- /BaseProvider/src/main/kotlin/com/horis/cloudstreamplugins/LoadRule.kt: -------------------------------------------------------------------------------- 1 | package com.lagradost.cloudstream3.cloudstreamplugins 2 | 3 | import com.lagradost.nicehttp.NiceResponse 4 | 5 | open class LoadRule( 6 | val name: String? = null, 7 | val year: String? = null, 8 | val plot: String? = null, 9 | val posterUrl: String? = null, 10 | val episodeList: String? = null, 11 | val episodeName: String? = null, 12 | val episodeUrl: String? = null 13 | ) { 14 | open fun getName(name: String?, res: NiceResponse) = name 15 | open fun getYear(year: String?, res: NiceResponse) = year 16 | open fun getPlot(plot: String?, res: NiceResponse) = plot 17 | open fun getPosterUrl(posterUrl: String?, res: NiceResponse) = posterUrl 18 | open fun getEpisodeList(episodeList: List<*>?, res: NiceResponse) = episodeList 19 | open fun getEpisodeName(episodeName: String?, res: NiceResponse) = episodeName 20 | open fun getEpisodeUrl(episodeUrl: String?, res: NiceResponse) = episodeUrl 21 | } 22 | -------------------------------------------------------------------------------- /archived/AnimehubProvider/src/main/kotlin/com/horis/cloudstreamplugins/AnimehubPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.extractorApis 8 | 9 | @CloudstreamPlugin 10 | class AnimehubPlugin: Plugin() { 11 | override fun load(context: Context) { 12 | // All providers should be added in this manner. Please don't edit the providers list directly. 13 | registerMainAPI(AnimehubProvider()) 14 | addExtractor(Vidstream2("https://goload.io")) 15 | addExtractor(Vidstream2("https://gogohd.net")) 16 | addExtractor(Vidstream2("https://gembedhd.com")) 17 | } 18 | 19 | private fun addExtractor(element: ExtractorApi) { 20 | element.sourcePlugin = __filename 21 | extractorApis.add(0, element) 22 | } 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /archived/DesicinemasProvider/src/main/kotlin/com/horis/cloudstreamplugins/DesicinemasPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.extractorApis 8 | 9 | @CloudstreamPlugin 10 | class DesicinemasPlugin: Plugin() { 11 | override fun load(context: Context) { 12 | // All providers should be added in this manner. Please don't edit the providers list directly. 13 | val provider = DesicinemasProvider() 14 | registerMainAPI(provider) 15 | registerMainAPI(BollyzoneProvider()) 16 | addExtractor(Tvlogy(provider.name)) 17 | addExtractor(Tellygossips(provider.name)) 18 | } 19 | 20 | private fun addExtractor(element: ExtractorApi) { 21 | element.sourcePlugin = __filename 22 | extractorApis.add(0, element) 23 | } 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/apis/VodAPI.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.apis 2 | 3 | import com.lagradost.nicehttp.NiceResponse 4 | 5 | interface VodAPI { 6 | 7 | suspend fun list( 8 | query: String? = null, 9 | page: Int = 0, 10 | ids: String? = null, 11 | type: String? = null, 12 | pageSize: Int? = null 13 | ): NiceResponse { 14 | throw NotImplementedError() 15 | } 16 | 17 | suspend fun search( 18 | query: String? = null, 19 | page: Int = 0, 20 | ids: String? = null, 21 | type: String? = null, 22 | pageSize: Int? = null 23 | ): NiceResponse { 24 | throw NotImplementedError() 25 | } 26 | 27 | suspend fun details(ids: String? = null, page: Int = 0, pageSize: Int? = null): NiceResponse { 28 | throw NotImplementedError() 29 | } 30 | 31 | suspend fun callApi(param: String): NiceResponse { 32 | throw NotImplementedError() 33 | } 34 | 35 | suspend fun playUrl(id: String): NiceResponse { 36 | throw NotImplementedError() 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /DramacoolProvider/src/main/kotlin/com/horis/cloudstreamplugins/Vidstream2.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import android.util.Log 4 | import com.lagradost.cloudstream3.SubtitleFile 5 | import com.lagradost.cloudstream3.extractors.Vidstream 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.ExtractorLink 8 | 9 | class Vidstream2(override val mainUrl: String) : ExtractorApi() { 10 | 11 | override val name = "Vidstream" 12 | override val requiresReferer = false 13 | 14 | private val vidStream by lazy { Vidstream(mainUrl) } 15 | 16 | override suspend fun getUrl( 17 | url: String, 18 | referer: String?, 19 | subtitleCallback: (SubtitleFile) -> Unit, 20 | callback: (ExtractorLink) -> Unit 21 | ) { 22 | Log.d("Vidstream2", "getUrl") 23 | if (!url.contains("streaming.php")) { 24 | return 25 | } 26 | vidStream.getUrl( 27 | url.substringAfter("id=").substringBefore("&"), 28 | subtitleCallback = subtitleCallback, 29 | callback = callback 30 | ) 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /archived/AnimehubProvider/src/main/kotlin/com/horis/cloudstreamplugins/Vidstream2.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import android.util.Log 4 | import com.lagradost.cloudstream3.SubtitleFile 5 | import com.lagradost.cloudstream3.extractors.Vidstream 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.ExtractorLink 8 | 9 | class Vidstream2(override val mainUrl: String) : ExtractorApi() { 10 | 11 | override val name = "Vidstream" 12 | override val requiresReferer = true 13 | 14 | private val vidStream by lazy { Vidstream(mainUrl) } 15 | 16 | override suspend fun getUrl( 17 | url: String, 18 | referer: String?, 19 | subtitleCallback: (SubtitleFile) -> Unit, 20 | callback: (ExtractorLink) -> Unit 21 | ) { 22 | Log.d("Vidstream2", "getUrl") 23 | if (!url.contains("streaming.php")) { 24 | return 25 | } 26 | vidStream.getUrl( 27 | url.substringAfter("id=").substringBefore("&"), 28 | subtitleCallback = subtitleCallback, 29 | callback = callback 30 | ) 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /archived/Kshow123Provider/src/main/kotlin/com/horis/cloudstreamplugins/Vidstream2.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import android.util.Log 4 | import com.lagradost.cloudstream3.SubtitleFile 5 | import com.lagradost.cloudstream3.extractors.Vidstream 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.ExtractorLink 8 | 9 | class Vidstream2(override val mainUrl: String) : ExtractorApi() { 10 | 11 | override val name = "Vidstream" 12 | override val requiresReferer = false 13 | 14 | private val vidStream by lazy { Vidstream(mainUrl) } 15 | 16 | override suspend fun getUrl( 17 | url: String, 18 | referer: String?, 19 | subtitleCallback: (SubtitleFile) -> Unit, 20 | callback: (ExtractorLink) -> Unit 21 | ) { 22 | Log.d("Vidstream2", "getUrl") 23 | if (!url.contains("streaming.php")) { 24 | return 25 | } 26 | vidStream.getUrl( 27 | url.substringAfter("id=").substringBefore("&"), 28 | subtitleCallback = subtitleCallback, 29 | callback = callback 30 | ) 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | -------------------------------------------------------------------------------- /archived/SockshareProvider/src/main/kotlin/com/horis/cloudstreamplugins/Eplayvid.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.SubtitleFile 4 | import com.lagradost.cloudstream3.amap 5 | import com.lagradost.cloudstream3.utils.ExtractorApi 6 | import com.lagradost.cloudstream3.utils.ExtractorLink 7 | import com.lagradost.cloudstream3.utils.Qualities 8 | 9 | class Eplayvid : ExtractorApi() { 10 | override val mainUrl = "https://eplayvid.net" 11 | override val name = "Eplayvid" 12 | override val requiresReferer = false 13 | 14 | override suspend fun getUrl( 15 | url: String, 16 | referer: String?, 17 | subtitleCallback: (SubtitleFile) -> Unit, 18 | callback: (ExtractorLink) -> Unit 19 | ) { 20 | val doc = app.get(url, referer = "$mainUrl/").document 21 | doc.select("video source").map { 22 | callback( 23 | ExtractorLink( 24 | name, 25 | name, 26 | it.attr("src"), 27 | "$mainUrl/", 28 | Qualities.Unknown.value 29 | ) 30 | ) 31 | } 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /archived/BollywoodProvider/src/main/kotlin/com/horis/cloudstreamplugins/BollywoodPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.plugins.CloudstreamPlugin 4 | import com.lagradost.cloudstream3.plugins.Plugin 5 | import android.content.Context 6 | import com.horis.BuildConfig 7 | 8 | @CloudstreamPlugin 9 | class BollywoodPlugin : Plugin() { 10 | override fun load(context: Context) { 11 | // All providers should be added in this manner. Please don't edit the providers list directly. 12 | // registerMainAPI(BollywoodProvider()) 13 | // registerMainAPI(HollywoodProvider()) 14 | registerMainAPI(GDIndexProvider()) 15 | // registerMainAPI(ShinobiCloudProvider()) 16 | // registerMainAPI(UltimateCourseProvider()) 17 | // registerMainAPI(NGIndexProvider()) 18 | // registerMainAPI(LemonMoviesProvider()) 19 | // registerMainAPI(TGArchiveProvider()) 20 | // registerMainAPI(SimpleProgramProvider()) 21 | // loadCryptoJs() 22 | } 23 | 24 | private fun loadCryptoJs() { 25 | val id = resources!!.getIdentifier("cryptojs", "raw", BuildConfig.LIBRARY_PACKAGE_NAME) 26 | cryptoJsSource = resources!!.openRawResource(id).bufferedReader().use { it.readText() } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /archived/BollywoodProvider/src/main/kotlin/com/horis/cloudstreamplugins/CryptoJs.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import org.mozilla.javascript.Context 4 | 5 | var cryptoJsSource: String? = null 6 | 7 | object CryptoJs { 8 | 9 | private val source = """ 10 | function aesEncrypt(data, key) { 11 | return CryptoJS.AES.encrypt(data, key).toString() 12 | } 13 | """.trimIndent() 14 | 15 | private val scope by lazy { 16 | val ct = Context.enter() 17 | ct.optimizationLevel = -1 18 | val scope = ct.initSafeStandardObjects() 19 | try { 20 | ct.evaluateString(scope, cryptoJsSource!!, "CryptoJs", 0, null) 21 | ct.evaluateString(scope, source, "CryptoJs", 0, null) 22 | } finally { 23 | Context.exit() 24 | } 25 | scope 26 | } 27 | 28 | // 返回结果为 base64 编码密文 29 | fun aesEncrypt(data: String, key: String): String { 30 | val ct = Context.enter() 31 | ct.optimizationLevel = -1 32 | try { 33 | return ct.evaluateString( 34 | scope, 35 | """aesEncrypt("$data", "$key")""", 36 | "aesEncrypt", 37 | 0, 38 | null 39 | ).toString() 40 | } finally { 41 | Context.exit() 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /archived/YaNaiFeiProvider/src/main/kotlin/com/horis/cloudstreamplugins/VodExtractor.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | import com.lagradost.cloudstream3.base64Decode 5 | import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson 6 | import org.jsoup.Jsoup 7 | import org.jsoup.nodes.Document 8 | 9 | class VodExtractor(html: String) { 10 | private val doc: Document = Jsoup.parse(html) 11 | var playerInfo: PlayerInfo? = null 12 | 13 | init { 14 | val playerInfoJSON = doc.select("script").firstOrNull { 15 | it.data().contains("var player_aaaa=") 16 | }?.data()?.substringAfter("var player_aaaa=") 17 | playerInfo = tryParseJson(playerInfoJSON) 18 | } 19 | 20 | fun getPlayUrl(): String? { 21 | playerInfo ?: return null 22 | return when (playerInfo?.encrypt) { 23 | 1 -> unescape(playerInfo?.url!!) 24 | 2 -> unescape(base64Decode(playerInfo?.url!!)) 25 | else /* 0 */ -> playerInfo?.url 26 | } 27 | } 28 | 29 | } 30 | 31 | data class PlayerInfo( 32 | @JsonProperty("encrypt") val encrypt: Int? = null, 33 | @JsonProperty("from") val from: String? = null, 34 | @JsonProperty("id") val id: String? = null, 35 | @JsonProperty("link") val link: String? = null, 36 | @JsonProperty("link_next") val linkNext: String? = null, 37 | @JsonProperty("link_pre") val linkPre: String? = null, 38 | @JsonProperty("url") val url: String? = null 39 | ) -------------------------------------------------------------------------------- /archived/DesicinemasProvider/src/main/kotlin/com/horis/cloudstreamplugins/Tvlogy.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.SubtitleFile 4 | import com.lagradost.cloudstream3.utils.ExtractorApi 5 | import com.lagradost.cloudstream3.utils.ExtractorLink 6 | import com.lagradost.cloudstream3.utils.Qualities 7 | 8 | class Tvlogy(val source: String) : ExtractorApi() { 9 | override val mainUrl = "https://hls.tvlogy.to" 10 | override val name = "Tvlogy" 11 | override val requiresReferer = false 12 | 13 | override suspend fun getUrl( 14 | url: String, 15 | referer: String?, 16 | subtitleCallback: (SubtitleFile) -> Unit, 17 | callback: (ExtractorLink) -> Unit 18 | ) { 19 | val id = url.substringAfter("data=") 20 | val data = mapOf( 21 | "hash" to id, 22 | "r" to "http%3A%2F%2Ftellygossips.net%2F" 23 | ) 24 | val headers = mapOf("X-Requested-With" to "XMLHttpRequest") 25 | val meta = app.post("$url&do=getVideo", headers = headers, referer = url, data = data) 26 | .parsedSafe() ?: return 27 | callback( 28 | ExtractorLink( 29 | source, 30 | name, 31 | meta.videoSource, 32 | url, 33 | Qualities.Unknown.value, 34 | meta.hls 35 | ) 36 | ) 37 | } 38 | 39 | data class MetaData( 40 | val hls: Boolean, 41 | val videoSource: String 42 | ) 43 | 44 | } -------------------------------------------------------------------------------- /ZxzjProvider/src/main/kotlin/com/horis/cloudstreamplugins/VodExtractor.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | import com.lagradost.cloudstream3.base64Decode 5 | import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson 6 | import org.jsoup.Jsoup 7 | import org.jsoup.nodes.Document 8 | 9 | class VodExtractor(html: String) { 10 | private val doc: Document = Jsoup.parse(html) 11 | var playerInfo: PlayerInfo? = null 12 | 13 | init { 14 | val playerInfoJSON = doc.select("script").firstOrNull { 15 | it.data().contains("var player_aaaa=") 16 | }?.data()?.substringAfter("var player_aaaa=") 17 | playerInfo = tryParseJson(playerInfoJSON) 18 | } 19 | 20 | fun getPlayUrl(): String? { 21 | playerInfo ?: return null 22 | return when (playerInfo?.encrypt) { 23 | 1 -> unescape(playerInfo?.url!!) 24 | 2 -> unescape(base64Decode(playerInfo?.url!!)) 25 | else /* 0 */ -> playerInfo?.url 26 | } 27 | } 28 | 29 | } 30 | 31 | data class PlayerInfo( 32 | @JsonProperty("encrypt") val encrypt: Int? = null, 33 | @JsonProperty("from") val from: String? = null, 34 | @JsonProperty("id") val id: String? = null, 35 | @JsonProperty("nid") val nId: String? = null, 36 | @JsonProperty("link") val link: String? = null, 37 | @JsonProperty("link_next") val linkNext: String? = null, 38 | @JsonProperty("link_pre") val linkPre: String? = null, 39 | @JsonProperty("url") val url: String? = null 40 | ) -------------------------------------------------------------------------------- /LibvioProvider/src/main/kotlin/com/horis/cloudstreamplugins/VodExtractor.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | import com.lagradost.cloudstream3.base64Decode 5 | import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson 6 | import org.jsoup.Jsoup 7 | import org.jsoup.nodes.Document 8 | 9 | class VodExtractor(html: String) { 10 | private val doc: Document = Jsoup.parse(html) 11 | var playerInfo: PlayerInfo? = null 12 | 13 | init { 14 | val playerInfoJSON = doc.select("script").firstOrNull { 15 | it.data().contains("var player_aaaa=") 16 | }?.data()?.substringAfter("var player_aaaa=") 17 | playerInfo = tryParseJson(playerInfoJSON) 18 | } 19 | 20 | fun getPlayUrl(): String? { 21 | playerInfo ?: return null 22 | return when (playerInfo?.encrypt) { 23 | 1 -> unescape(playerInfo?.url!!) 24 | 2 -> unescape(base64Decode(playerInfo?.url!!)) 25 | else /* 0 */ -> playerInfo?.url 26 | } 27 | } 28 | 29 | } 30 | 31 | data class PlayerInfo( 32 | @JsonProperty("encrypt") val encrypt: Int? = null, 33 | @JsonProperty("from") val from: String? = null, 34 | @JsonProperty("id") val id: String? = null, 35 | @JsonProperty("nid") val nId: String? = null, 36 | @JsonProperty("link") val link: String? = null, 37 | @JsonProperty("link_next") val linkNext: String? = null, 38 | @JsonProperty("link_pre") val linkPre: String? = null, 39 | @JsonProperty("url") val url: String? = null 40 | ) -------------------------------------------------------------------------------- /archived/CzzyProvider/src/main/kotlin/com/horis/cloudstreamplugins/VodExtractor.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | import com.lagradost.cloudstream3.base64Decode 5 | import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson 6 | import org.jsoup.Jsoup 7 | import org.jsoup.nodes.Document 8 | 9 | class VodExtractor(html: String) { 10 | private val doc: Document = Jsoup.parse(html) 11 | var playerInfo: PlayerInfo? = null 12 | 13 | init { 14 | val playerInfoJSON = doc.select("script").firstOrNull { 15 | it.data().contains("var player_aaaa=") 16 | }?.data()?.substringAfter("var player_aaaa=") 17 | playerInfo = tryParseJson(playerInfoJSON) 18 | } 19 | 20 | fun getPlayUrl(): String? { 21 | playerInfo ?: return null 22 | return when (playerInfo?.encrypt) { 23 | 1 -> unescape(playerInfo?.url!!) 24 | 2 -> unescape(base64Decode(playerInfo?.url!!)) 25 | else /* 0 */ -> playerInfo?.url 26 | } 27 | } 28 | 29 | } 30 | 31 | data class PlayerInfo( 32 | @JsonProperty("encrypt") val encrypt: Int? = null, 33 | @JsonProperty("from") val from: String? = null, 34 | @JsonProperty("id") val id: String? = null, 35 | @JsonProperty("nid") val nId: String? = null, 36 | @JsonProperty("link") val link: String? = null, 37 | @JsonProperty("link_next") val linkNext: String? = null, 38 | @JsonProperty("link_pre") val linkPre: String? = null, 39 | @JsonProperty("url") val url: String? = null 40 | ) -------------------------------------------------------------------------------- /archived/DamixingqiuProvider/src/main/kotlin/com/horis/cloudstreamplugins/VodExtractor.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | import com.lagradost.cloudstream3.base64Decode 5 | import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson 6 | import org.jsoup.Jsoup 7 | import org.jsoup.nodes.Document 8 | 9 | class VodExtractor(html: String) { 10 | private val doc: Document = Jsoup.parse(html) 11 | var playerInfo: PlayerInfo? = null 12 | 13 | val encrypt get() = playerInfo?.encrypt 14 | 15 | init { 16 | val playerInfoJSON = doc.select("script").firstOrNull { 17 | it.data().contains("var player_aaaa=") 18 | }?.data()?.substringAfter("var player_aaaa=") 19 | playerInfo = tryParseJson(playerInfoJSON) 20 | } 21 | 22 | fun getPlayUrl(): String? { 23 | playerInfo ?: return null 24 | return when (playerInfo?.encrypt) { 25 | 1 -> unescape(playerInfo?.url!!) 26 | 2 -> unescape(base64Decode(playerInfo?.url!!)) 27 | else /* 0 */ -> playerInfo?.url 28 | } 29 | } 30 | 31 | } 32 | 33 | data class PlayerInfo( 34 | @JsonProperty("encrypt") val encrypt: Int? = null, 35 | @JsonProperty("from") val from: String? = null, 36 | @JsonProperty("id") val id: String? = null, 37 | @JsonProperty("link") val link: String? = null, 38 | @JsonProperty("link_next") val linkNext: String? = null, 39 | @JsonProperty("link_pre") val linkPre: String? = null, 40 | @JsonProperty("url") val url: String? = null 41 | ) -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | # https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency 4 | concurrency: 5 | group: "build" 6 | cancel-in-progress: true 7 | 8 | on: 9 | push: 10 | branches: 11 | # choose your default branch 12 | - master 13 | - main 14 | paths-ignore: 15 | - '*.md' 16 | 17 | jobs: 18 | build: 19 | runs-on: ubuntu-latest 20 | steps: 21 | - name: Checkout 22 | uses: actions/checkout@master 23 | with: 24 | path: "src" 25 | 26 | - name: Checkout builds 27 | uses: actions/checkout@master 28 | with: 29 | ref: "builds" 30 | path: "builds" 31 | 32 | - name: Clean old builds 33 | run: rm $GITHUB_WORKSPACE/builds/*.cs3 || true 34 | 35 | - name: Setup JDK 11 36 | uses: actions/setup-java@v1 37 | with: 38 | java-version: 11 39 | 40 | - name: Setup Android SDK 41 | uses: android-actions/setup-android@v2 42 | 43 | - name: Build Plugins 44 | run: | 45 | cd $GITHUB_WORKSPACE/src 46 | chmod +x gradlew 47 | ./gradlew make makePluginsJson 48 | cp **/build/*.cs3 $GITHUB_WORKSPACE/builds 49 | cp build/plugins.json $GITHUB_WORKSPACE/builds 50 | 51 | - name: Push builds 52 | run: | 53 | cd $GITHUB_WORKSPACE/builds 54 | git config --local user.email "actions@github.com" 55 | git config --local user.name "GitHub Actions" 56 | git add . 57 | git commit --amend -m "Build $GITHUB_SHA" || exit 0 # do not error if nothing to commit 58 | git push --force 59 | -------------------------------------------------------------------------------- /MxplayerProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import kotlin.reflect.KClass 11 | 12 | val JSONParser = object : ResponseParser { 13 | val mapper: ObjectMapper = jacksonObjectMapper().configure( 14 | DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false 15 | ).configure( 16 | JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true 17 | ) 18 | 19 | override fun parse(text: String, kClass: KClass): T { 20 | return mapper.readValue(text, kClass.java) 21 | } 22 | 23 | override fun parseSafe(text: String, kClass: KClass): T? { 24 | return try { 25 | mapper.readValue(text, kClass.java) 26 | } catch (e: Exception) { 27 | null 28 | } 29 | } 30 | 31 | override fun writeValueAsString(obj: Any): String { 32 | return mapper.writeValueAsString(obj) 33 | } 34 | } 35 | 36 | val app = Requests(responseParser = JSONParser).apply { 37 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 38 | } 39 | 40 | inline fun parseJson(text: String): T { 41 | return JSONParser.parse(text, T::class) 42 | } 43 | 44 | inline fun tryParseJson(text: String): T? { 45 | return try { 46 | return JSONParser.parseSafe(text, T::class) 47 | } catch (e: Exception) { 48 | e.printStackTrace() 49 | null 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /archived/Movie123Provider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import kotlin.reflect.KClass 11 | 12 | val JSONParser = object : ResponseParser { 13 | val mapper: ObjectMapper = jacksonObjectMapper().configure( 14 | DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false 15 | ).configure( 16 | JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true 17 | ) 18 | 19 | override fun parse(text: String, kClass: KClass): T { 20 | return mapper.readValue(text, kClass.java) 21 | } 22 | 23 | override fun parseSafe(text: String, kClass: KClass): T? { 24 | return try { 25 | mapper.readValue(text, kClass.java) 26 | } catch (e: Exception) { 27 | null 28 | } 29 | } 30 | 31 | override fun writeValueAsString(obj: Any): String { 32 | return mapper.writeValueAsString(obj) 33 | } 34 | } 35 | 36 | val app = Requests(responseParser = JSONParser).apply { 37 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 38 | } 39 | 40 | inline fun parseJson(text: String): T { 41 | return JSONParser.parse(text, T::class) 42 | } 43 | 44 | inline fun tryParseJson(text: String): T? { 45 | return try { 46 | return JSONParser.parseSafe(text, T::class) 47 | } catch (e: Exception) { 48 | e.printStackTrace() 49 | null 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /archived/PiousIndexProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import kotlin.reflect.KClass 11 | 12 | val JSONParser = object : ResponseParser { 13 | val mapper: ObjectMapper = jacksonObjectMapper().configure( 14 | DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false 15 | ).configure( 16 | JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true 17 | ) 18 | 19 | override fun parse(text: String, kClass: KClass): T { 20 | return mapper.readValue(text, kClass.java) 21 | } 22 | 23 | override fun parseSafe(text: String, kClass: KClass): T? { 24 | return try { 25 | mapper.readValue(text, kClass.java) 26 | } catch (e: Exception) { 27 | null 28 | } 29 | } 30 | 31 | override fun writeValueAsString(obj: Any): String { 32 | return mapper.writeValueAsString(obj) 33 | } 34 | } 35 | 36 | val app = Requests(responseParser = JSONParser).apply { 37 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 38 | } 39 | 40 | inline fun parseJson(text: String): T { 41 | return JSONParser.parse(text, T::class) 42 | } 43 | 44 | inline fun tryParseJson(text: String): T? { 45 | return try { 46 | return JSONParser.parseSafe(text, T::class) 47 | } catch (e: Exception) { 48 | e.printStackTrace() 49 | null 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /archived/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import kotlin.reflect.KClass 11 | 12 | val JSONParser = object : ResponseParser { 13 | val mapper: ObjectMapper = jacksonObjectMapper().configure( 14 | DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false 15 | ).configure( 16 | JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true 17 | ) 18 | 19 | override fun parse(text: String, kClass: KClass): T { 20 | return mapper.readValue(text, kClass.java) 21 | } 22 | 23 | override fun parseSafe(text: String, kClass: KClass): T? { 24 | return try { 25 | mapper.readValue(text, kClass.java) 26 | } catch (e: Exception) { 27 | null 28 | } 29 | } 30 | 31 | override fun writeValueAsString(obj: Any): String { 32 | return mapper.writeValueAsString(obj) 33 | } 34 | } 35 | 36 | val app = Requests(responseParser = JSONParser).apply { 37 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 38 | } 39 | 40 | inline fun parseJson(text: String): T { 41 | return JSONParser.parse(text, T::class) 42 | } 43 | 44 | inline fun tryParseJson(text: String): T? { 45 | return try { 46 | return JSONParser.parseSafe(text, T::class) 47 | } catch (e: Exception) { 48 | e.printStackTrace() 49 | null 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/apiextractors/CollectAPIExtractor.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.apiextractors 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | import com.horis.cloudstreamplugins.Category 5 | import com.horis.cloudstreamplugins.Vod 6 | import com.horis.cloudstreamplugins.apis.VodAPI 7 | import com.lagradost.cloudstream3.ErrorLoadingException 8 | import java.net.URLEncoder 9 | 10 | class CollectAPIExtractor(private val api: VodAPI) : VodAPIExtractor { 11 | private var categoryCache: List? = null 12 | 13 | override suspend fun getCategory(limit: Int, skip: Int): List { 14 | categoryCache?.let { return it } 15 | val res = api.list() 16 | categoryCache = res.parsedSafe()?.list?.drop(skip)?.take(limit) 17 | ?: throw ErrorLoadingException("获取分类数据失败 - 状态码${res.code}") 18 | return categoryCache!! 19 | } 20 | 21 | override suspend fun getVodList( 22 | query: String?, 23 | page: Int, 24 | ids: String?, 25 | type: String?, 26 | pageSize: Int? 27 | ): List? { 28 | val encodedQuery = query?.let { URLEncoder.encode(it, "utf-8") } 29 | return api.list(encodedQuery, page, ids, type, pageSize).parsedSafe()?.list 30 | } 31 | 32 | override suspend fun getVodListDetail( 33 | query: String?, 34 | page: Int, 35 | ids: String?, 36 | type: String?, 37 | pageSize: Int? 38 | ): List? { 39 | val encodedQuery = query?.let { URLEncoder.encode(it, "utf-8") } 40 | return api.search(encodedQuery, page, ids, type, pageSize).parsedSafe()?.list 41 | } 42 | 43 | data class VodList( 44 | @JsonProperty("list") val list: ArrayList 45 | ) 46 | 47 | data class CategoryList( 48 | @JsonProperty("class") val list: ArrayList 49 | ) 50 | } -------------------------------------------------------------------------------- /archived/AnimexinaxProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import kotlin.reflect.KClass 11 | 12 | val JSONParser = object : ResponseParser { 13 | val mapper: ObjectMapper = jacksonObjectMapper().configure( 14 | DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false 15 | ).configure( 16 | JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true 17 | ) 18 | 19 | override fun parse(text: String, kClass: KClass): T { 20 | return mapper.readValue(text, kClass.java) 21 | } 22 | 23 | override fun parseSafe(text: String, kClass: KClass): T? { 24 | return try { 25 | mapper.readValue(text, kClass.java) 26 | } catch (e: Exception) { 27 | null 28 | } 29 | } 30 | 31 | override fun writeValueAsString(obj: Any): String { 32 | return mapper.writeValueAsString(obj) 33 | } 34 | } 35 | 36 | val app = Requests(responseParser = JSONParser).apply { 37 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 38 | } 39 | 40 | inline fun parseJson(text: String): T { 41 | return JSONParser.parse(text, T::class) 42 | } 43 | 44 | inline fun tryParseJson(text: String): T? { 45 | return try { 46 | return JSONParser.parseSafe(text, T::class) 47 | } catch (e: Exception) { 48 | e.printStackTrace() 49 | null 50 | } 51 | } 52 | 53 | fun String.substring(left: String, right: String): String { 54 | return substringAfter(left).substringBefore(right) 55 | } 56 | 57 | -------------------------------------------------------------------------------- /archived/SockshareProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import kotlin.reflect.KClass 11 | 12 | val JSONParser = object : ResponseParser { 13 | val mapper: ObjectMapper = jacksonObjectMapper().configure( 14 | DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false 15 | ).configure( 16 | JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true 17 | ) 18 | 19 | override fun parse(text: String, kClass: KClass): T { 20 | return mapper.readValue(text, kClass.java) 21 | } 22 | 23 | override fun parseSafe(text: String, kClass: KClass): T? { 24 | return try { 25 | mapper.readValue(text, kClass.java) 26 | } catch (e: Exception) { 27 | null 28 | } 29 | } 30 | 31 | override fun writeValueAsString(obj: Any): String { 32 | return mapper.writeValueAsString(obj) 33 | } 34 | } 35 | 36 | val app = Requests(responseParser = JSONParser).apply { 37 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 38 | } 39 | 40 | inline fun parseJson(text: String): T { 41 | return JSONParser.parse(text, T::class) 42 | } 43 | 44 | inline fun tryParseJson(text: String): T? { 45 | return try { 46 | return JSONParser.parseSafe(text, T::class) 47 | } catch (e: Exception) { 48 | e.printStackTrace() 49 | null 50 | } 51 | } 52 | 53 | fun String.substring(left: String, right: String): String { 54 | return substringAfter(left).substringBefore(right) 55 | } 56 | 57 | -------------------------------------------------------------------------------- /archived/DesicinemasProvider/src/main/kotlin/com/horis/cloudstreamplugins/Tellygossips.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.SubtitleFile 4 | import com.lagradost.cloudstream3.utils.ExtractorApi 5 | import com.lagradost.cloudstream3.utils.ExtractorLink 6 | import com.lagradost.cloudstream3.utils.Qualities 7 | 8 | class Tellygossips(val source:String) : ExtractorApi() { 9 | override val mainUrl = "https://flow.tellygossips.net" 10 | override val name = "Tellygossips" 11 | override val requiresReferer = false 12 | private val referer = "http://tellygossips.net/" 13 | private val configRegex = "var config = ([\\s\\S]*?);".toRegex() 14 | private val headers = mapOf("Referer" to "$mainUrl/") 15 | 16 | override suspend fun getUrl( 17 | url: String, 18 | referer: String?, 19 | subtitleCallback: (SubtitleFile) -> Unit, 20 | callback: (ExtractorLink) -> Unit 21 | ) { 22 | val doc = app.get(url, referer = this.referer).document 23 | val configStr = doc.select("script") 24 | .map { it.data() } 25 | .firstOrNull { it.contains("var config = ") } 26 | ?.let { configRegex.find(it.trim())?.groupValues?.get(1) } ?: return 27 | val config = tryParseJson(configStr) ?: return 28 | for (link in config.sources) { 29 | callback( 30 | ExtractorLink( 31 | source, 32 | "$name ${link.label}", 33 | link.file ?: link.src ?: continue, 34 | "", 35 | Qualities.Unknown.value, 36 | true, 37 | headers 38 | ) 39 | ) 40 | } 41 | } 42 | 43 | data class Config( 44 | val sources: List, 45 | ) 46 | 47 | data class VideoLink( 48 | val file: String?, 49 | val src: String?, 50 | val label: String, 51 | val type: String, 52 | ) 53 | 54 | } -------------------------------------------------------------------------------- /DdysProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import kotlin.reflect.KClass 11 | 12 | val JSONParser = object : ResponseParser { 13 | val mapper: ObjectMapper = jacksonObjectMapper() 14 | .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) 15 | .configure(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true) 16 | .configure(JsonReadFeature.ALLOW_UNQUOTED_FIELD_NAMES.mappedFeature(), true) 17 | .configure(JsonReadFeature.ALLOW_TRAILING_COMMA.mappedFeature(), true) 18 | 19 | override fun parse(text: String, kClass: KClass): T { 20 | return mapper.readValue(text, kClass.java) 21 | } 22 | 23 | override fun parseSafe(text: String, kClass: KClass): T? { 24 | return try { 25 | mapper.readValue(text, kClass.java) 26 | } catch (e: Exception) { 27 | null 28 | } 29 | } 30 | 31 | override fun writeValueAsString(obj: Any): String { 32 | return mapper.writeValueAsString(obj) 33 | } 34 | } 35 | 36 | inline fun parseJson(text: String): T { 37 | return JSONParser.parse(text, T::class) 38 | } 39 | 40 | inline fun tryParseJson(text: String): T? { 41 | return try { 42 | return JSONParser.parseSafe(text, T::class) 43 | } catch (e: Exception) { 44 | e.printStackTrace() 45 | null 46 | } 47 | } 48 | 49 | val app = Requests(responseParser = JSONParser).apply { 50 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 51 | } 52 | 53 | fun String.substring(left: String, right: String): String { 54 | return substringAfter(left).substringBefore(right) 55 | } 56 | -------------------------------------------------------------------------------- /YjysProvider/src/main/kotlin/com/horis/cloudstreamplugins/GzipUtil.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import java.io.ByteArrayInputStream 4 | import java.io.ByteArrayOutputStream 5 | import java.util.zip.GZIPInputStream 6 | import java.util.zip.GZIPOutputStream 7 | 8 | 9 | object GzipUtil { 10 | fun compress(str: String?): ByteArray? { 11 | var out: ByteArrayOutputStream? = null 12 | var gzip: GZIPOutputStream? = null 13 | return try { 14 | if (str == null || str.length == 0) { 15 | return null 16 | } 17 | out = ByteArrayOutputStream() 18 | gzip = GZIPOutputStream(out) 19 | gzip.write(str.toByteArray(charset("utf-8"))) 20 | gzip.finish() 21 | out.toByteArray() 22 | } catch (e: Exception) { 23 | e.printStackTrace() 24 | null 25 | } finally { 26 | try { 27 | out?.close() 28 | gzip?.close() 29 | } catch (e: Exception) { 30 | e.printStackTrace() 31 | } 32 | } 33 | } 34 | 35 | fun decompress(by: ByteArray?): String { 36 | var out: ByteArrayOutputStream? = null 37 | var gunzip: GZIPInputStream? = null 38 | return try { 39 | if (by == null || by.isEmpty()) { 40 | return "" 41 | } 42 | out = ByteArrayOutputStream() 43 | gunzip = GZIPInputStream(ByteArrayInputStream(by)) 44 | val buffer = ByteArray(1024) 45 | var n: Int 46 | while (gunzip.read(buffer).also { n = it } != -1) { 47 | out.write(buffer, 0, n) 48 | } 49 | out.flush() 50 | String(out.toByteArray()) 51 | } catch (e: Exception) { 52 | e.printStackTrace() 53 | "" 54 | } finally { 55 | try { 56 | out?.close() 57 | gunzip?.close() 58 | } catch (e: Exception) { 59 | e.printStackTrace() 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /archived/NivodProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | data class UserIdentity( 4 | val oid: String 5 | ) 6 | 7 | data class NiVodHome( 8 | val list: List
, 9 | ) 10 | 11 | data class Section( 12 | val blockId: Int, 13 | val blockType: Int, 14 | val title: String, 15 | val rows: List 16 | ) 17 | 18 | data class Row( 19 | val cells: List, 20 | ) 21 | 22 | data class Cell( 23 | val cellId: Int, 24 | val img: String, 25 | val show: Show, 26 | val title: String 27 | ) 28 | 29 | data class Show( 30 | val actors: String, 31 | val episodesTxt: String, 32 | val regionName: String, 33 | val showIdCode: String, 34 | val showImg: String, 35 | val showTitle: String, 36 | val showTypeName: String 37 | ) 38 | 39 | data class DetailResponse( 40 | val entity: Entity, 41 | ) 42 | 43 | data class Entity( 44 | val showDesc: String, 45 | val showTypeName: String, 46 | val showIdCode: String, 47 | val showImg: String, 48 | val showTitle: String, 49 | val regionName: String, 50 | val actors: String, 51 | val postYear: String, 52 | val isEpisodes: Int, 53 | val plays: List, 54 | val playLangs: List, 55 | val playSources: List, 56 | ) 57 | 58 | data class Lang( 59 | val langId: String, 60 | val langName: String, 61 | ) 62 | 63 | data class Source( 64 | val sourceId: String, 65 | val sourceName: String, 66 | ) 67 | 68 | //data class PlayListResponse( 69 | // val list: List 70 | //) 71 | 72 | data class Play( 73 | val displayName: String, 74 | var showIdCode: String? = null, 75 | val playIdCode: String, 76 | ) 77 | 78 | data class PlayInfoResponse( 79 | val entity: PlayInfo, 80 | ) 81 | 82 | data class PlayInfo( 83 | val playType: Int, 84 | val playUrl: String, 85 | ) 86 | 87 | data class SearchResp( 88 | val list: List, 89 | ) 90 | 91 | data class SearchEntity( 92 | val showTitle: String, 93 | val showIdCode: String, 94 | val showImg: String, 95 | ) 96 | -------------------------------------------------------------------------------- /archived/RainostreamProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import kotlin.reflect.KClass 11 | 12 | val JSONParser = object : ResponseParser { 13 | val mapper: ObjectMapper = jacksonObjectMapper() 14 | .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) 15 | .configure(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true) 16 | .configure(JsonReadFeature.ALLOW_UNQUOTED_FIELD_NAMES.mappedFeature(), true) 17 | .configure(JsonReadFeature.ALLOW_TRAILING_COMMA.mappedFeature(), true) 18 | 19 | override fun parse(text: String, kClass: KClass): T { 20 | return mapper.readValue(text, kClass.java) 21 | } 22 | 23 | override fun parseSafe(text: String, kClass: KClass): T? { 24 | return try { 25 | mapper.readValue(text, kClass.java) 26 | } catch (e: Exception) { 27 | null 28 | } 29 | } 30 | 31 | override fun writeValueAsString(obj: Any): String { 32 | return mapper.writeValueAsString(obj) 33 | } 34 | } 35 | 36 | inline fun parseJson(text: String): T { 37 | return JSONParser.parse(text, T::class) 38 | } 39 | 40 | inline fun tryParseJson(text: String): T? { 41 | return try { 42 | return JSONParser.parseSafe(text, T::class) 43 | } catch (e: Exception) { 44 | e.printStackTrace() 45 | null 46 | } 47 | } 48 | 49 | val app = Requests(responseParser = JSONParser).apply { 50 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 51 | } 52 | 53 | fun String.substring(left: String, right: String): String { 54 | return substringAfter(left).substringBefore(right) 55 | } 56 | -------------------------------------------------------------------------------- /archived/DesicinemasProvider/src/main/kotlin/com/horis/cloudstreamplugins/BollyzoneProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.* 4 | import org.jsoup.nodes.Element 5 | 6 | class BollyzoneProvider : DesicinemasProvider() { 7 | override val supportedTypes = setOf( 8 | TvType.TvSeries 9 | ) 10 | override var lang = "hi" 11 | 12 | override var mainUrl = "https://www.bollyzone.tv" 13 | override var name = "Bollyzone" 14 | 15 | override val mainPage = mainPageOf( 16 | "$mainUrl/series/" to "Series" 17 | ) 18 | 19 | override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? { 20 | val url = if (page == 1) { 21 | request.data 22 | } else { 23 | "${request.data}page/$page/" 24 | } 25 | 26 | val doc = app.get(url, referer = "$mainUrl/").document 27 | 28 | val pages = doc.selectFirst(".MovieList") 29 | ?.toHomePageList(request.name) 30 | 31 | val hasNext = pages?.list?.isNotEmpty() == true 32 | 33 | return HomePageResponse(arrayListOf(pages).filterNotNull(), hasNext) 34 | } 35 | 36 | override suspend fun search(query: String): List { 37 | val url = "$mainUrl/?s=$query" 38 | val doc = app.get(url, referer = "$mainUrl/").document 39 | 40 | val items = doc.select(".MovieList li").mapNotNull { 41 | it.toHomePageResult() 42 | } 43 | return items 44 | } 45 | 46 | private fun Element.toHomePageList(name: String): HomePageList { 47 | val items = select("li") 48 | .mapNotNull { 49 | it.toHomePageResult() 50 | } 51 | return HomePageList(name, items) 52 | } 53 | 54 | private fun Element.toHomePageResult(): SearchResponse? { 55 | val title = selectFirst("h2")?.text()?.trim() ?: return null 56 | val href = fixUrlNull(selectFirst("a")?.attr("href")) ?: return null 57 | val img = selectFirst("img") 58 | val posterUrl = fixUrlNull(img?.attr("src")) 59 | 60 | return newAnimeSearchResponse(title, href) { 61 | this.posterUrl = posterUrl 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /archived/Stream1Provider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import com.lagradost.nicehttp.Session 11 | import kotlin.reflect.KClass 12 | 13 | val JSONParser = object : ResponseParser { 14 | val mapper: ObjectMapper = jacksonObjectMapper() 15 | .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) 16 | .configure(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true) 17 | .configure(JsonReadFeature.ALLOW_UNQUOTED_FIELD_NAMES.mappedFeature(), true) 18 | .configure(JsonReadFeature.ALLOW_TRAILING_COMMA.mappedFeature(), true) 19 | 20 | override fun parse(text: String, kClass: KClass): T { 21 | return mapper.readValue(text, kClass.java) 22 | } 23 | 24 | override fun parseSafe(text: String, kClass: KClass): T? { 25 | return try { 26 | mapper.readValue(text, kClass.java) 27 | } catch (e: Exception) { 28 | null 29 | } 30 | } 31 | 32 | override fun writeValueAsString(obj: Any): String { 33 | return mapper.writeValueAsString(obj) 34 | } 35 | } 36 | 37 | inline fun parseJson(text: String): T { 38 | return JSONParser.parse(text, T::class) 39 | } 40 | 41 | inline fun tryParseJson(text: String): T? { 42 | return try { 43 | return JSONParser.parseSafe(text, T::class) 44 | } catch (e: Exception) { 45 | e.printStackTrace() 46 | null 47 | } 48 | } 49 | 50 | val app = Requests(responseParser = JSONParser).apply { 51 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 52 | } 53 | 54 | val session by lazy { 55 | Session(app.baseClient).apply { 56 | responseParser = JSONParser 57 | } 58 | } 59 | 60 | fun String.substring(left: String, right: String): String { 61 | return substringAfter(left).substringBefore(right) 62 | } 63 | -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/Entities.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | 5 | data class Vod( 6 | @JsonProperty("vod_id") val id: Int? = null, 7 | @JsonProperty("type_id") val typeId: Int? = null, 8 | @JsonProperty("vod_name") val name: String? = null, 9 | @JsonProperty("vod_sub") val sub: String? = null, 10 | @JsonProperty("vod_pic") val pic: String? = null, 11 | @JsonProperty("vod_actor") val actor: String? = null, 12 | @JsonProperty("vod_director") val director: String? = null, 13 | @JsonProperty("vod_writer") val writer: String? = null, 14 | @JsonProperty("vod_blurb") val blurb: String? = null, // 简介 15 | @JsonProperty("vod_remarks") val remarks: String? = null, 16 | @JsonProperty("vod_area") val area: String? = null, 17 | @JsonProperty("vod_lang") val lang: String? = null, 18 | @JsonProperty("vod_year") val year: String? = null, 19 | @JsonProperty("vod_time") val time: String? = null, 20 | @JsonProperty("vod_content") val content: String? = null, 21 | @JsonProperty("vod_play_from") val playFrom: String? = null, 22 | @JsonProperty("vod_play_server") val playServer: String? = null, 23 | @JsonProperty("vod_play_note") val playNote: String? = null, 24 | @JsonProperty("vod_play_url") val playUrl: String? = null, 25 | @JsonProperty("type_name") val typeName: String? = null, 26 | ) 27 | 28 | data class Category( 29 | @JsonProperty("type_id") val typeId: Int, 30 | @JsonProperty("type_name") val typeName: String 31 | ) 32 | 33 | data class PlayData( 34 | val server: String, 35 | val url: String 36 | ) 37 | 38 | data class PlayerInfo( 39 | @JsonProperty("encrypt") val encrypt: Int? = null, 40 | @JsonProperty("from") val from: String? = null, 41 | @JsonProperty("id") val id: String? = null, 42 | @JsonProperty("link") val link: String? = null, 43 | @JsonProperty("link_next") val linkNext: String? = null, 44 | @JsonProperty("link_pre") val linkPre: String? = null, 45 | @JsonProperty("url") val url: String? = null 46 | ) 47 | 48 | data class VodSource( 49 | var name: String = "", 50 | var apiUrl: String = "", 51 | var apiType: Int = 0, 52 | var responseType: Int = 0, 53 | var skipCategory: Int = 0 54 | ) 55 | -------------------------------------------------------------------------------- /YjysProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import android.annotation.SuppressLint 4 | import com.fasterxml.jackson.core.json.JsonReadFeature 5 | import com.fasterxml.jackson.databind.DeserializationFeature 6 | import com.fasterxml.jackson.databind.ObjectMapper 7 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 8 | import com.lagradost.cloudstream3.USER_AGENT 9 | import com.lagradost.nicehttp.Requests 10 | import com.lagradost.nicehttp.ResponseParser 11 | import javax.crypto.Cipher 12 | import javax.crypto.spec.SecretKeySpec 13 | import kotlin.reflect.KClass 14 | 15 | val JSONParser = object : ResponseParser { 16 | val mapper: ObjectMapper = jacksonObjectMapper() 17 | .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) 18 | .configure(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true) 19 | .configure(JsonReadFeature.ALLOW_UNQUOTED_FIELD_NAMES.mappedFeature(), true) 20 | .configure(JsonReadFeature.ALLOW_TRAILING_COMMA.mappedFeature(), true) 21 | 22 | override fun parse(text: String, kClass: KClass): T { 23 | return mapper.readValue(text, kClass.java) 24 | } 25 | 26 | override fun parseSafe(text: String, kClass: KClass): T? { 27 | return try { 28 | mapper.readValue(text, kClass.java) 29 | } catch (e: Exception) { 30 | null 31 | } 32 | } 33 | 34 | override fun writeValueAsString(obj: Any): String { 35 | return mapper.writeValueAsString(obj) 36 | } 37 | } 38 | 39 | inline fun parseJson(text: String): T { 40 | return JSONParser.parse(text, T::class) 41 | } 42 | 43 | inline fun tryParseJson(text: String): T? { 44 | return try { 45 | return JSONParser.parseSafe(text, T::class) 46 | } catch (e: Exception) { 47 | e.printStackTrace() 48 | null 49 | } 50 | } 51 | 52 | val app = Requests(responseParser = JSONParser).apply { 53 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 54 | } 55 | 56 | fun String.substring(left: String, right: String): String { 57 | return substringAfter(left).substringBefore(right) 58 | } 59 | 60 | @SuppressLint("GetInstance") 61 | fun aesEncrypt(data: ByteArray, key: ByteArray): ByteArray { 62 | val aes = Cipher.getInstance("AES/ECB/PKCS5Padding") 63 | aes.init(Cipher.ENCRYPT_MODE, SecretKeySpec(key, "AES")) 64 | return aes.doFinal(data) 65 | } 66 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/apis/CollectAPI.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.apis 2 | 3 | import com.horis.cloudstreamplugins.app 4 | import com.lagradost.nicehttp.NiceResponse 5 | 6 | class CollectAPI(private val apiUrl: String) : VodAPI { 7 | 8 | companion object { 9 | const val UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36" 10 | } 11 | 12 | override suspend fun list( 13 | query: String?, 14 | page: Int, 15 | ids: String?, 16 | type: String?, 17 | pageSize: Int? 18 | ): NiceResponse { 19 | return callApi(query, page, ids, type, pageSize, "list") 20 | } 21 | 22 | override suspend fun search( 23 | query: String?, 24 | page: Int, 25 | ids: String?, 26 | type: String?, 27 | pageSize: Int? 28 | ): NiceResponse { 29 | return callApi(query, page, ids, type, pageSize) 30 | } 31 | 32 | override suspend fun details(ids: String?, page: Int, pageSize: Int?): NiceResponse { 33 | return callApi(ids = ids, page = page, pageSize = pageSize) 34 | } 35 | 36 | private suspend fun callApi( 37 | query: String? = null, 38 | page: Int = 0, 39 | ids: String? = null, 40 | type: String? = null, 41 | pageSize: Int? = null, 42 | action: String = "videolist" 43 | ): NiceResponse { 44 | var param = "?ac=$action" 45 | if (query != null) { 46 | param += "&wd=$query" 47 | } else if (ids != null) { 48 | param += "&ids=$ids" 49 | } 50 | if (page > 0) { 51 | param += "&pg=$page" 52 | } 53 | type?.let { 54 | param += "&t=$type" 55 | } 56 | pageSize?.let { 57 | param += "&pagesize=$pageSize" 58 | } 59 | return fetchApi("$apiUrl$param") 60 | } 61 | 62 | private suspend fun fetchApi( 63 | url: String, 64 | params: Map = mapOf(), 65 | headers: Map = mapOf("User-Agent" to UserAgent), 66 | retry: Int = 3 67 | ): NiceResponse { 68 | var retry1 = retry - 1 69 | while (retry1-- > 0) { 70 | try { 71 | return app.get(url, headers, referer = url, params = params, verify = false) 72 | } catch (_: Exception) { 73 | } 74 | } 75 | return app.get(url, headers, referer = url, params = params, verify = false) 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /archived/BollywoodProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import android.annotation.SuppressLint 4 | import com.fasterxml.jackson.core.json.JsonReadFeature 5 | import com.fasterxml.jackson.core.type.TypeReference 6 | import com.fasterxml.jackson.databind.DeserializationFeature 7 | import com.fasterxml.jackson.databind.ObjectMapper 8 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 9 | import com.lagradost.cloudstream3.USER_AGENT 10 | import com.lagradost.cloudstream3.mapper 11 | import com.lagradost.nicehttp.NiceResponse 12 | import com.lagradost.nicehttp.Requests 13 | import com.lagradost.nicehttp.ResponseParser 14 | import javax.crypto.Cipher 15 | import javax.crypto.spec.IvParameterSpec 16 | import javax.crypto.spec.SecretKeySpec 17 | import kotlin.reflect.KClass 18 | 19 | val JSONParser = object : ResponseParser { 20 | val mapper: ObjectMapper = jacksonObjectMapper().configure( 21 | DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false 22 | ).configure( 23 | JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true 24 | ) 25 | 26 | override fun parse(text: String, kClass: KClass): T { 27 | return mapper.readValue(text, kClass.java) 28 | } 29 | 30 | override fun parseSafe(text: String, kClass: KClass): T? { 31 | return try { 32 | mapper.readValue(text, kClass.java) 33 | } catch (e: Exception) { 34 | null 35 | } 36 | } 37 | 38 | override fun writeValueAsString(obj: Any): String { 39 | return mapper.writeValueAsString(obj) 40 | } 41 | } 42 | 43 | val app = Requests(responseParser = JSONParser).apply { 44 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 45 | } 46 | 47 | fun String.substring(left: String, right: String): String { 48 | return substringAfter(left).substringBefore(right) 49 | } 50 | 51 | @SuppressLint("GetInstance") 52 | fun aesEncrypt(data: ByteArray, key: ByteArray, iv: ByteArray): ByteArray { 53 | val aes = Cipher.getInstance("AES/CBC/PKCS7Padding") 54 | aes.init(Cipher.ENCRYPT_MODE, SecretKeySpec(key, "AES"), IvParameterSpec(iv)) 55 | return aes.doFinal(data) 56 | } 57 | 58 | fun aesDecrypt(data: ByteArray, key: ByteArray, iv: ByteArray): ByteArray { 59 | val aes = Cipher.getInstance("AES/CBC/PKCS5Padding") 60 | aes.init(Cipher.DECRYPT_MODE, SecretKeySpec(key, "AES"), IvParameterSpec(iv)) 61 | return aes.doFinal(data) 62 | } 63 | 64 | inline fun NiceResponse.parse(): T { 65 | return mapper.readValue(text, object : TypeReference() {}) 66 | } 67 | -------------------------------------------------------------------------------- /archived/BollywoodProvider/src/main/kotlin/com/horis/cloudstreamplugins/AlphanumComparator.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | // https://stackoverflow.com/a/36507266 4 | // https://gist.github.com/MichaelRocks/1b94bb44c7804e999dbf31dac86955ec 5 | object AlphanumComparator : Comparator { 6 | override fun compare(s1: String, s2: String): Int { 7 | var thisMarker = 0 8 | var thatMarker = 0 9 | val s1Length = s1.length 10 | val s2Length = s2.length 11 | 12 | while (thisMarker < s1Length && thatMarker < s2Length) { 13 | val thisChunk = getChunk(s1, s1Length, thisMarker) 14 | thisMarker += thisChunk.length 15 | 16 | val thatChunk = getChunk(s2, s2Length, thatMarker) 17 | thatMarker += thatChunk.length 18 | 19 | // If both chunks contain numeric characters, sort them numerically. 20 | var result: Int 21 | if (isDigit(thisChunk[0]) && isDigit(thatChunk[0])) { 22 | // Simple chunk comparison by length. 23 | val thisChunkLength = thisChunk.length 24 | result = thisChunkLength - thatChunk.length 25 | // If equal, the first different number counts. 26 | if (result == 0) { 27 | for (i in 0..thisChunkLength - 1) { 28 | result = thisChunk[i] - thatChunk[i] 29 | if (result != 0) { 30 | return result 31 | } 32 | } 33 | } 34 | } else { 35 | result = thisChunk.compareTo(thatChunk) 36 | } 37 | 38 | if (result != 0) { 39 | return result 40 | } 41 | } 42 | 43 | return s1Length - s2Length 44 | } 45 | 46 | private fun getChunk(string: String, length: Int, marker: Int): String { 47 | var current = marker 48 | val chunk = StringBuilder() 49 | var c = string[current] 50 | chunk.append(c) 51 | current++ 52 | if (isDigit(c)) { 53 | while (current < length) { 54 | c = string[current] 55 | if (!isDigit(c)) { 56 | break 57 | } 58 | chunk.append(c) 59 | current++ 60 | } 61 | } else { 62 | while (current < length) { 63 | c = string[current] 64 | if (isDigit(c)) { 65 | break 66 | } 67 | chunk.append(c) 68 | current++ 69 | } 70 | } 71 | return chunk.toString() 72 | } 73 | 74 | private fun isDigit(ch: Char): Boolean { 75 | return '0' <= ch && ch <= '9' 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /archived/DesicinemasProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.SubtitleFile 8 | import com.lagradost.cloudstream3.USER_AGENT 9 | import com.lagradost.cloudstream3.utils.ExtractorLink 10 | import com.lagradost.nicehttp.Requests 11 | import com.lagradost.nicehttp.ResponseParser 12 | import kotlin.reflect.KClass 13 | 14 | val JSONParser = object : ResponseParser { 15 | val mapper: ObjectMapper = jacksonObjectMapper() 16 | .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) 17 | .configure(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true) 18 | .configure(JsonReadFeature.ALLOW_UNQUOTED_FIELD_NAMES.mappedFeature(), true) 19 | .configure(JsonReadFeature.ALLOW_TRAILING_COMMA.mappedFeature(), true) 20 | 21 | override fun parse(text: String, kClass: KClass): T { 22 | return mapper.readValue(text, kClass.java) 23 | } 24 | 25 | override fun parseSafe(text: String, kClass: KClass): T? { 26 | return try { 27 | mapper.readValue(text, kClass.java) 28 | } catch (e: Exception) { 29 | null 30 | } 31 | } 32 | 33 | override fun writeValueAsString(obj: Any): String { 34 | return mapper.writeValueAsString(obj) 35 | } 36 | } 37 | 38 | val app = Requests(responseParser = JSONParser).apply { 39 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 40 | } 41 | 42 | inline fun parseJson(text: String): T { 43 | return JSONParser.parse(text, T::class) 44 | } 45 | 46 | inline fun tryParseJson(text: String): T? { 47 | return try { 48 | return JSONParser.parse(text, T::class) 49 | } catch (e: Exception) { 50 | e.printStackTrace() 51 | null 52 | } 53 | } 54 | 55 | suspend fun loadExtractor( 56 | url: String, 57 | subtitleCallback: (SubtitleFile) -> Unit, 58 | callback: (ExtractorLink) -> Unit, 59 | name: String? = null, 60 | ): Boolean { 61 | return com.lagradost.cloudstream3.utils.loadExtractor( 62 | url = url, 63 | referer = null, 64 | subtitleCallback = subtitleCallback, 65 | callback = { 66 | callback( 67 | ExtractorLink( 68 | it.source, 69 | name ?: it.name, 70 | it.url, 71 | it.referer, 72 | it.quality, 73 | it.isM3u8, 74 | it.headers, 75 | it.extractorData 76 | ) 77 | ) 78 | } 79 | ) 80 | } 81 | 82 | -------------------------------------------------------------------------------- /archived/PaheProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import kotlin.reflect.KClass 11 | 12 | val JSONParser = object : ResponseParser { 13 | val mapper: ObjectMapper = jacksonObjectMapper().configure( 14 | DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false 15 | ).configure( 16 | JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true 17 | ) 18 | 19 | override fun parse(text: String, kClass: KClass): T { 20 | return mapper.readValue(text, kClass.java) 21 | } 22 | 23 | override fun parseSafe(text: String, kClass: KClass): T? { 24 | return try { 25 | mapper.readValue(text, kClass.java) 26 | } catch (e: Exception) { 27 | null 28 | } 29 | } 30 | 31 | override fun writeValueAsString(obj: Any): String { 32 | return mapper.writeValueAsString(obj) 33 | } 34 | } 35 | 36 | val app = Requests(responseParser = JSONParser).apply { 37 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 38 | } 39 | 40 | inline fun parseJson(text: String): T { 41 | return JSONParser.parse(text, T::class) 42 | } 43 | 44 | inline fun tryParseJson(text: String): T? { 45 | return try { 46 | return JSONParser.parseSafe(text, T::class) 47 | } catch (e: Exception) { 48 | e.printStackTrace() 49 | null 50 | } 51 | } 52 | 53 | /** 54 | * Escape解码 55 | * 56 | * @param content 被转义的内容 57 | * @return 解码后的字符串 58 | */ 59 | fun unescape(content: String): String { 60 | if (content.isBlank()) { 61 | return content 62 | } 63 | val tmp = StringBuilder(content.length) 64 | var lastPos = 0 65 | var pos: Int 66 | var ch: Char 67 | while (lastPos < content.length) { 68 | pos = content.indexOf("%", lastPos) 69 | if (pos == lastPos) { 70 | if (content[pos + 1] == 'u') { 71 | ch = content.substring(pos + 2, pos + 6).toInt(16).toChar() 72 | tmp.append(ch) 73 | lastPos = pos + 6 74 | } else { 75 | ch = content.substring(pos + 1, pos + 3).toInt(16).toChar() 76 | tmp.append(ch) 77 | lastPos = pos + 3 78 | } 79 | } else { 80 | lastPos = if (pos == -1) { 81 | tmp.append(content.substring(lastPos)) 82 | content.length 83 | } else { 84 | tmp.append(content, lastPos, pos) 85 | pos 86 | } 87 | } 88 | } 89 | return tmp.toString() 90 | } 91 | 92 | -------------------------------------------------------------------------------- /MxplayerProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | 4 | data class Mxplayer( 5 | val config: Config, 6 | val entities: Map, 7 | val platform: String, 8 | val homepage: HomePage?, 9 | ) 10 | 11 | data class Config( 12 | val imageBaseUrl: String, 13 | val videoCdnBaseUrl: String 14 | ) 15 | 16 | data class Entity( 17 | val contributors: List, 18 | val description: String?, 19 | val descriptor: List?, 20 | val duration: Int, 21 | val genres: List, 22 | val id: String, 23 | val imageInfo: List, 24 | val languages: List, 25 | val partial: Boolean, 26 | val publishTime: String?, 27 | val rating: Int, 28 | val stream: Stream?, 29 | val trailer: List?, 30 | val title: String, 31 | val type: String, 32 | val videoCount: Int?, 33 | val tabs: List?, 34 | val webUrl: String 35 | ) { 36 | val isTvShow get() = type == "tvshow" 37 | } 38 | 39 | data class Tab( 40 | val api: String, 41 | val containers: List?, 42 | val type: String, 43 | val title: String, 44 | ) 45 | 46 | data class Container( 47 | val aroundApi: String, 48 | val id: String, 49 | val title: String, 50 | val type: String, 51 | val sequence: Int 52 | ) 53 | 54 | data class Trailer( 55 | val stream: Stream 56 | ) 57 | 58 | data class Stream( 59 | val hls: VideoLink?, 60 | val dash: VideoLink?, 61 | val mxplay: Mxplay?, 62 | val thirdParty: VideoLink?, 63 | val provider: String, 64 | val videoHash: String, 65 | ) 66 | 67 | data class Mxplay( 68 | val hls: VideoLink? 69 | ) 70 | 71 | data class VideoLink( 72 | val base: String?, 73 | val high: String?, 74 | val main: String?, 75 | val hlsUrl: String?, 76 | val dashUrl: String?, 77 | ) 78 | 79 | data class Image( 80 | val density: String, 81 | val height: Int, 82 | val type: String, 83 | val url: String, 84 | val width: Int, 85 | ) 86 | 87 | data class Contributor( 88 | val name: String, 89 | val type: String, 90 | val imageInfo: List?, 91 | ) 92 | 93 | data class HomePage( 94 | val home: Home 95 | ) 96 | 97 | data class Home( 98 | val next: String, 99 | val sections: List
, 100 | ) 101 | 102 | data class Section( 103 | val forceLoadImage: Boolean, 104 | val id: String, 105 | val items: List, 106 | val name: String, 107 | val next: String, 108 | val style: String, 109 | val webUrl: String, 110 | ) 111 | 112 | data class HomeDetail( 113 | val next: String?, 114 | val previous: String?, 115 | val sections: List, 116 | ) 117 | 118 | data class SectionDetail( 119 | val id: String, 120 | val items: List, 121 | val name: String, 122 | val next: String?, 123 | val style: String, 124 | val webUrl: String?, 125 | ) 126 | 127 | data class EpisodesData( 128 | val id: String, 129 | val next: String?, 130 | val previous: String?, 131 | val items: List, 132 | ) 133 | -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/UAPIXMLProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.* 4 | import org.jsoup.Jsoup 5 | import org.jsoup.nodes.CDataNode 6 | import org.jsoup.parser.Parser 7 | 8 | abstract class UAPIXMLProvider : BaseUAPIProvider() { 9 | 10 | override suspend fun getCategory(): List { 11 | categoryCache?.let { return it } 12 | val xml = fetchApi("$mainUrl?ac=list").text 13 | categoryCache = CategoryList(xml).list?.take(8) 14 | return categoryCache ?: throw ErrorLoadingException("获取分类数据失败") 15 | } 16 | 17 | override suspend fun getVodList(url: String): List? { 18 | val xml = fetchApi(url).text 19 | return VodList(xml).list 20 | } 21 | 22 | class VodList(xml: String) { 23 | var list: List? = null 24 | 25 | init { 26 | val doc = Jsoup.parse(xml, Parser.xmlParser()) 27 | list = doc.select("video").map { 28 | val id = it.selectFirst("id")?.text()?.toInt() 29 | val typeId = it.selectFirst("tid")?.text()?.toInt() 30 | val name = (it.selectFirst("name")?.childNode(0) as CDataNode).text() 31 | val pic = it.selectFirst("pic")?.text() 32 | val typeName = it.selectFirst("type")?.text() 33 | val lang = it.selectFirst("lang")?.text() 34 | val area = it.selectFirst("area")?.text() 35 | val year = it.selectFirst("year")?.text() 36 | val remarks = (it.selectFirst("note")?.childNode(0) as CDataNode).text() 37 | val actor = (it.selectFirst("actor")?.childNode(0) as CDataNode).text() 38 | val director = (it.selectFirst("director")?.childNode(0) as CDataNode).text() 39 | val playData = it.select("dl dd") 40 | val playFrom = playData.joinToString("$$$") { 41 | it.attr("flag") 42 | } 43 | val playUrl = playData.joinToString("$$$") { 44 | (it.childNode(0) as CDataNode).text() 45 | } 46 | val blurb = (it.selectFirst("des")?.childNode(0) as CDataNode).text() 47 | val time = it.selectFirst("last")?.text() 48 | Vod( 49 | id = id, 50 | typeId = typeId, 51 | name = name, 52 | pic = pic, 53 | actor = actor, 54 | director = director, 55 | blurb = blurb, 56 | remarks = remarks, 57 | area = area, 58 | lang = lang, 59 | year = year, 60 | time = time, 61 | playFrom = playFrom, 62 | playUrl = playUrl, 63 | typeName = typeName 64 | ) 65 | } 66 | } 67 | } 68 | 69 | class CategoryList(xml: String) { 70 | var list: List? = null 71 | 72 | init { 73 | val doc = Jsoup.parse(xml, Parser.xmlParser()) 74 | list = doc.select("class ty").map { 75 | Category(it.attr("id").toInt(), it.text()) 76 | } 77 | } 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /archived/AnimexinaxProvider/src/main/kotlin/com/horis/cloudstreamplugins/Dailymotion.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | import com.lagradost.cloudstream3.SubtitleFile 5 | import com.lagradost.cloudstream3.app 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.ExtractorLink 8 | import com.lagradost.cloudstream3.utils.Qualities 9 | import java.net.URL 10 | 11 | class Dailymotion : ExtractorApi() { 12 | override val mainUrl = "https://www.dailymotion.com" 13 | override val name = "Dailymotion" 14 | override val requiresReferer = false 15 | private val videoIdRegex = "^[kx][a-zA-Z0-9]+\$".toRegex() 16 | 17 | // https://www.dailymotion.com/video/k3JAHfletwk94ayCVIu 18 | // https://www.dailymotion.com/embed/video/k3JAHfletwk94ayCVIu 19 | override suspend fun getUrl( 20 | url: String, 21 | referer: String?, 22 | subtitleCallback: (SubtitleFile) -> Unit, 23 | callback: (ExtractorLink) -> Unit 24 | ) { 25 | val embedUrl = getEmbedUrl(url) ?: return 26 | val doc = app.get(embedUrl).document 27 | val prefix = "window.__PLAYER_CONFIG__ = " 28 | val configStr = doc.selectFirst("script:containsData($prefix)")?.data() ?: return 29 | val config = tryParseJson(configStr.substringAfter(prefix)) ?: return 30 | val id = getVideoId(embedUrl) ?: return 31 | val dmV1st = config.dmInternalData.v1st 32 | val dmTs = config.dmInternalData.ts 33 | val metaDataUrl = 34 | "$mainUrl/player/metadata/video/$id?locale=en&dmV1st=$dmV1st&dmTs=$dmTs&is_native_app=0" 35 | val cookies = mapOf( 36 | "v1st" to dmV1st, 37 | "dmvk" to config.context.dmvk, 38 | "ts" to dmTs.toString() 39 | ) 40 | val metaData = app.get(metaDataUrl, referer = embedUrl, cookies = cookies) 41 | .parsedSafe() ?: return 42 | metaData.qualities.forEach { (key, video) -> 43 | video.map { 44 | ExtractorLink( 45 | name, 46 | "$name $key", 47 | it.url, 48 | "", 49 | Qualities.Unknown.value, 50 | true 51 | ) 52 | }.forEach(callback) 53 | } 54 | } 55 | 56 | private fun getEmbedUrl(url: String): String? { 57 | if (url.contains("/embed/")) { 58 | return url 59 | } 60 | val vid = getVideoId(url) ?: return null 61 | return "$mainUrl/embed/video/$vid" 62 | } 63 | 64 | private fun getVideoId(url: String): String? { 65 | val path = URL(url).path 66 | val id = path.substringAfter("video/") 67 | if (id.matches(videoIdRegex)) { 68 | return id 69 | } 70 | return null 71 | } 72 | 73 | data class Config( 74 | val context: Context, 75 | val dmInternalData: InternalData 76 | ) 77 | 78 | data class InternalData( 79 | val ts: Int, 80 | val v1st: String 81 | ) 82 | 83 | data class Context( 84 | @JsonProperty("access_token") val accessToken: String?, 85 | val dmvk: String, 86 | ) 87 | 88 | data class MetaData( 89 | val qualities: Map> 90 | ) 91 | 92 | data class VideoLink( 93 | val type: String, 94 | val url: String 95 | ) 96 | 97 | } -------------------------------------------------------------------------------- /YjysProvider/src/main/kotlin/com/horis/cloudstreamplugins/ZlibUtil.kt: -------------------------------------------------------------------------------- 1 | import java.io.* 2 | import java.util.zip.Deflater 3 | import java.util.zip.DeflaterOutputStream 4 | import java.util.zip.Inflater 5 | import java.util.zip.InflaterInputStream 6 | 7 | /** 8 | * zlib 压缩算法 9 | */ 10 | object ZlibUtil { 11 | /** 12 | * 压缩 13 | * 14 | * @param data 15 | * 待压缩数据 16 | * @return byte[] 压缩后的数据 17 | */ 18 | fun compress(data: ByteArray): ByteArray { 19 | var output = ByteArray(0) 20 | val compresser = Deflater() 21 | compresser.reset() 22 | compresser.setInput(data) 23 | compresser.finish() 24 | val bos = ByteArrayOutputStream(data.size) 25 | try { 26 | val buf = ByteArray(1024) 27 | while (!compresser.finished()) { 28 | val i = compresser.deflate(buf) 29 | bos.write(buf, 0, i) 30 | } 31 | output = bos.toByteArray() 32 | } catch (e: Exception) { 33 | output = data 34 | e.printStackTrace() 35 | } finally { 36 | try { 37 | bos.close() 38 | } catch (e: IOException) { 39 | e.printStackTrace() 40 | } 41 | } 42 | compresser.end() 43 | return output 44 | } 45 | 46 | /** 47 | * 压缩 48 | * 49 | * @param data 50 | * 待压缩数据 51 | * 52 | * @param os 53 | * 输出流 54 | */ 55 | fun compress(data: ByteArray, os: OutputStream?) { 56 | val dos = DeflaterOutputStream(os) 57 | try { 58 | dos.write(data, 0, data.size) 59 | dos.finish() 60 | dos.flush() 61 | } catch (e: IOException) { 62 | e.printStackTrace() 63 | } 64 | } 65 | 66 | /** 67 | * 解压缩 68 | * 69 | * @param data 70 | * 待压缩的数据 71 | * @return byte[] 解压缩后的数据 72 | */ 73 | fun decompress(data: ByteArray): ByteArray { 74 | var output = ByteArray(0) 75 | val decompresser = Inflater() 76 | decompresser.reset() 77 | decompresser.setInput(data) 78 | val o = ByteArrayOutputStream(data.size) 79 | try { 80 | val buf = ByteArray(1024) 81 | while (!decompresser.finished()) { 82 | val i = decompresser.inflate(buf) 83 | o.write(buf, 0, i) 84 | } 85 | output = o.toByteArray() 86 | } catch (e: Exception) { 87 | e.printStackTrace() 88 | } finally { 89 | try { 90 | o.close() 91 | } catch (e: IOException) { 92 | e.printStackTrace() 93 | } 94 | } 95 | decompresser.end() 96 | return output 97 | } 98 | 99 | /** 100 | * 解压缩 101 | * 102 | * @param is 103 | * 输入流 104 | * @return byte[] 解压缩后的数据 105 | */ 106 | fun decompress(`is`: InputStream?): ByteArray { 107 | val iis = InflaterInputStream(`is`) 108 | val o = ByteArrayOutputStream(1024) 109 | try { 110 | var i = 1024 111 | val buf = ByteArray(i) 112 | while (iis.read(buf, 0, i).also { i = it } > 0) { 113 | o.write(buf, 0, i) 114 | } 115 | } catch (e: IOException) { 116 | e.printStackTrace() 117 | } 118 | return o.toByteArray() 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /LibvioProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import javax.crypto.Cipher 11 | import javax.crypto.spec.IvParameterSpec 12 | import javax.crypto.spec.SecretKeySpec 13 | import kotlin.reflect.KClass 14 | 15 | val JSONParser = object : ResponseParser { 16 | val mapper: ObjectMapper = jacksonObjectMapper().configure( 17 | DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false 18 | ).configure( 19 | JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true 20 | ) 21 | 22 | override fun parse(text: String, kClass: KClass): T { 23 | return mapper.readValue(text, kClass.java) 24 | } 25 | 26 | override fun parseSafe(text: String, kClass: KClass): T? { 27 | return try { 28 | mapper.readValue(text, kClass.java) 29 | } catch (e: Exception) { 30 | null 31 | } 32 | } 33 | 34 | override fun writeValueAsString(obj: Any): String { 35 | return mapper.writeValueAsString(obj) 36 | } 37 | } 38 | 39 | inline fun parseJson(text: String): T { 40 | return JSONParser.parse(text, T::class) 41 | } 42 | 43 | inline fun tryParseJson(text: String): T? { 44 | return try { 45 | return JSONParser.parseSafe(text, T::class) 46 | } catch (e: Exception) { 47 | e.printStackTrace() 48 | null 49 | } 50 | } 51 | 52 | val app = Requests(responseParser = JSONParser).apply { 53 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 54 | } 55 | 56 | /** 57 | * Escape解码 58 | * 59 | * @param content 被转义的内容 60 | * @return 解码后的字符串 61 | */ 62 | fun unescape(content: String): String { 63 | if (content.isBlank()) { 64 | return content 65 | } 66 | val tmp = StringBuilder(content.length) 67 | var lastPos = 0 68 | var pos: Int 69 | var ch: Char 70 | while (lastPos < content.length) { 71 | pos = content.indexOf("%", lastPos) 72 | if (pos == lastPos) { 73 | if (content[pos + 1] == 'u') { 74 | ch = content.substring(pos + 2, pos + 6).toInt(16).toChar() 75 | tmp.append(ch) 76 | lastPos = pos + 6 77 | } else { 78 | ch = content.substring(pos + 1, pos + 3).toInt(16).toChar() 79 | tmp.append(ch) 80 | lastPos = pos + 3 81 | } 82 | } else { 83 | lastPos = if (pos == -1) { 84 | tmp.append(content.substring(lastPos)) 85 | content.length 86 | } else { 87 | tmp.append(content, lastPos, pos) 88 | pos 89 | } 90 | } 91 | } 92 | return tmp.toString() 93 | } 94 | 95 | 96 | fun aesDecrypt(data: ByteArray, key: ByteArray, iv: ByteArray): ByteArray { 97 | val aes = Cipher.getInstance("AES/CBC/PKCS5Padding") 98 | aes.init(Cipher.DECRYPT_MODE, SecretKeySpec(key, "AES"), IvParameterSpec(iv)) 99 | return aes.doFinal(data) 100 | } 101 | 102 | fun String.substring(left: String, right: String): String { 103 | return substringAfter(left).substringBefore(right) 104 | } 105 | -------------------------------------------------------------------------------- /archived/YaNaiFeiProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.lagradost.cloudstream3.USER_AGENT 8 | import com.lagradost.nicehttp.Requests 9 | import com.lagradost.nicehttp.ResponseParser 10 | import javax.crypto.Cipher 11 | import javax.crypto.spec.IvParameterSpec 12 | import javax.crypto.spec.SecretKeySpec 13 | import kotlin.reflect.KClass 14 | 15 | val JSONParser = object : ResponseParser { 16 | val mapper: ObjectMapper = jacksonObjectMapper().configure( 17 | DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false 18 | ).configure( 19 | JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true 20 | ) 21 | 22 | override fun parse(text: String, kClass: KClass): T { 23 | return mapper.readValue(text, kClass.java) 24 | } 25 | 26 | override fun parseSafe(text: String, kClass: KClass): T? { 27 | return try { 28 | mapper.readValue(text, kClass.java) 29 | } catch (e: Exception) { 30 | null 31 | } 32 | } 33 | 34 | override fun writeValueAsString(obj: Any): String { 35 | return mapper.writeValueAsString(obj) 36 | } 37 | } 38 | 39 | inline fun parseJson(text: String): T { 40 | return JSONParser.parse(text, T::class) 41 | } 42 | 43 | inline fun tryParseJson(text: String): T? { 44 | return try { 45 | return JSONParser.parseSafe(text, T::class) 46 | } catch (e: Exception) { 47 | e.printStackTrace() 48 | null 49 | } 50 | } 51 | 52 | val app = Requests(responseParser = JSONParser).apply { 53 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 54 | } 55 | 56 | /** 57 | * Escape解码 58 | * 59 | * @param content 被转义的内容 60 | * @return 解码后的字符串 61 | */ 62 | fun unescape(content: String): String { 63 | if (content.isBlank()) { 64 | return content 65 | } 66 | val tmp = StringBuilder(content.length) 67 | var lastPos = 0 68 | var pos: Int 69 | var ch: Char 70 | while (lastPos < content.length) { 71 | pos = content.indexOf("%", lastPos) 72 | if (pos == lastPos) { 73 | if (content[pos + 1] == 'u') { 74 | ch = content.substring(pos + 2, pos + 6).toInt(16).toChar() 75 | tmp.append(ch) 76 | lastPos = pos + 6 77 | } else { 78 | ch = content.substring(pos + 1, pos + 3).toInt(16).toChar() 79 | tmp.append(ch) 80 | lastPos = pos + 3 81 | } 82 | } else { 83 | lastPos = if (pos == -1) { 84 | tmp.append(content.substring(lastPos)) 85 | content.length 86 | } else { 87 | tmp.append(content, lastPos, pos) 88 | pos 89 | } 90 | } 91 | } 92 | return tmp.toString() 93 | } 94 | 95 | 96 | fun aesDecrypt(data: ByteArray, key: ByteArray, iv: ByteArray): ByteArray { 97 | val aes = Cipher.getInstance("AES/CBC/PKCS5Padding") 98 | aes.init(Cipher.DECRYPT_MODE, SecretKeySpec(key, "AES"), IvParameterSpec(iv)) 99 | return aes.doFinal(data) 100 | } 101 | 102 | fun String.substring(left: String, right: String): String { 103 | return substringAfter(left).substringBefore(right) 104 | } 105 | -------------------------------------------------------------------------------- /archived/NivodProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import android.annotation.SuppressLint 4 | import com.fasterxml.jackson.core.json.JsonReadFeature 5 | import com.fasterxml.jackson.databind.DeserializationFeature 6 | import com.fasterxml.jackson.databind.ObjectMapper 7 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 8 | import com.lagradost.cloudstream3.USER_AGENT 9 | import com.lagradost.nicehttp.Requests 10 | import com.lagradost.nicehttp.ResponseParser 11 | import okhttp3.Interceptor 12 | import okhttp3.Response 13 | import okhttp3.ResponseBody.Companion.toResponseBody 14 | import okio.ByteString.Companion.decodeHex 15 | import javax.crypto.Cipher 16 | import javax.crypto.spec.SecretKeySpec 17 | import kotlin.reflect.KClass 18 | 19 | val JSONParser = object : ResponseParser { 20 | val mapper: ObjectMapper = jacksonObjectMapper() 21 | .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) 22 | .configure(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true) 23 | .configure(JsonReadFeature.ALLOW_UNQUOTED_FIELD_NAMES.mappedFeature(), true) 24 | .configure(JsonReadFeature.ALLOW_TRAILING_COMMA.mappedFeature(), true) 25 | 26 | override fun parse(text: String, kClass: KClass): T { 27 | return mapper.readValue(text, kClass.java) 28 | } 29 | 30 | override fun parseSafe(text: String, kClass: KClass): T? { 31 | return try { 32 | mapper.readValue(text, kClass.java) 33 | } catch (e: Exception) { 34 | null 35 | } 36 | } 37 | 38 | override fun writeValueAsString(obj: Any): String { 39 | return mapper.writeValueAsString(obj) 40 | } 41 | } 42 | 43 | inline fun parseJson(text: String): T { 44 | return JSONParser.parse(text, T::class) 45 | } 46 | 47 | inline fun tryParseJson(text: String): T? { 48 | return try { 49 | return JSONParser.parseSafe(text, T::class) 50 | } catch (e: Exception) { 51 | e.printStackTrace() 52 | null 53 | } 54 | } 55 | 56 | val app = Requests(responseParser = JSONParser).apply { 57 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 58 | } 59 | 60 | fun String.substring(left: String, right: String): String { 61 | return substringAfter(left).substringBefore(right) 62 | } 63 | 64 | @SuppressLint("GetInstance") 65 | fun aesEncrypt(data: ByteArray, key: ByteArray): ByteArray { 66 | val aes = Cipher.getInstance("AES/ECB/PKCS5Padding") 67 | aes.init(Cipher.ENCRYPT_MODE, SecretKeySpec(key, "AES")) 68 | return aes.doFinal(data) 69 | } 70 | 71 | @SuppressLint("GetInstance") 72 | fun desDecrypt(data: ByteArray, key: ByteArray): ByteArray { 73 | val aes = Cipher.getInstance("DES/ECB/PKCS7Padding") 74 | aes.init(Cipher.DECRYPT_MODE, SecretKeySpec(key, "DES")) 75 | return aes.doFinal(data) 76 | } 77 | 78 | class DecryptInterceptor: Interceptor { 79 | override fun intercept(chain: Interceptor.Chain): Response { 80 | val request = chain.request() 81 | val response = chain.proceed(request) 82 | val hexBody = response.peekBody(Long.MAX_VALUE).string() 83 | val contentType = response.body.contentType() 84 | return try { 85 | val encryptData = hexBody.decodeHex().toByteArray() 86 | val data = String(desDecrypt(encryptData, "diao.com".toByteArray())) 87 | val body = data.toResponseBody(contentType) 88 | response.newBuilder().body(body).build() 89 | } catch (e: Exception) { 90 | e.printStackTrace() 91 | response 92 | } 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /ZxzjProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import android.annotation.SuppressLint 4 | import com.fasterxml.jackson.core.json.JsonReadFeature 5 | import com.fasterxml.jackson.databind.DeserializationFeature 6 | import com.fasterxml.jackson.databind.ObjectMapper 7 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 8 | import com.lagradost.cloudstream3.USER_AGENT 9 | import com.lagradost.nicehttp.Requests 10 | import com.lagradost.nicehttp.ResponseParser 11 | import javax.crypto.Cipher 12 | import javax.crypto.spec.SecretKeySpec 13 | import kotlin.reflect.KClass 14 | 15 | val JSONParser = object : ResponseParser { 16 | val mapper: ObjectMapper = jacksonObjectMapper() 17 | .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) 18 | .configure(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true) 19 | .configure(JsonReadFeature.ALLOW_UNQUOTED_FIELD_NAMES.mappedFeature(), true) 20 | .configure(JsonReadFeature.ALLOW_TRAILING_COMMA.mappedFeature(), true) 21 | 22 | override fun parse(text: String, kClass: KClass): T { 23 | return mapper.readValue(text, kClass.java) 24 | } 25 | 26 | override fun parseSafe(text: String, kClass: KClass): T? { 27 | return try { 28 | mapper.readValue(text, kClass.java) 29 | } catch (e: Exception) { 30 | null 31 | } 32 | } 33 | 34 | override fun writeValueAsString(obj: Any): String { 35 | return mapper.writeValueAsString(obj) 36 | } 37 | } 38 | 39 | inline fun parseJson(text: String): T { 40 | return JSONParser.parse(text, T::class) 41 | } 42 | 43 | inline fun tryParseJson(text: String): T? { 44 | return try { 45 | return JSONParser.parseSafe(text, T::class) 46 | } catch (e: Exception) { 47 | e.printStackTrace() 48 | null 49 | } 50 | } 51 | 52 | val app = Requests(responseParser = JSONParser).apply { 53 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 54 | } 55 | 56 | fun String.substring(left: String, right: String): String { 57 | return substringAfter(left).substringBefore(right) 58 | } 59 | 60 | /** 61 | * Escape解码 62 | * 63 | * @param content 被转义的内容 64 | * @return 解码后的字符串 65 | */ 66 | fun unescape(content: String): String { 67 | if (content.isBlank()) { 68 | return content 69 | } 70 | val tmp = StringBuilder(content.length) 71 | var lastPos = 0 72 | var pos: Int 73 | var ch: Char 74 | while (lastPos < content.length) { 75 | pos = content.indexOf("%", lastPos) 76 | if (pos == lastPos) { 77 | if (content[pos + 1] == 'u') { 78 | ch = content.substring(pos + 2, pos + 6).toInt(16).toChar() 79 | tmp.append(ch) 80 | lastPos = pos + 6 81 | } else { 82 | ch = content.substring(pos + 1, pos + 3).toInt(16).toChar() 83 | tmp.append(ch) 84 | lastPos = pos + 3 85 | } 86 | } else { 87 | lastPos = if (pos == -1) { 88 | tmp.append(content.substring(lastPos)) 89 | content.length 90 | } else { 91 | tmp.append(content, lastPos, pos) 92 | pos 93 | } 94 | } 95 | } 96 | return tmp.toString() 97 | } 98 | 99 | @SuppressLint("GetInstance") 100 | fun aesEncrypt(data: ByteArray, key: ByteArray): ByteArray { 101 | val aes = Cipher.getInstance("AES/ECB/PKCS5Padding") 102 | aes.init(Cipher.ENCRYPT_MODE, SecretKeySpec(key, "AES")) 103 | return aes.doFinal(data) 104 | } 105 | -------------------------------------------------------------------------------- /archived/CzzyProvider/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import android.annotation.SuppressLint 4 | import com.fasterxml.jackson.core.json.JsonReadFeature 5 | import com.fasterxml.jackson.databind.DeserializationFeature 6 | import com.fasterxml.jackson.databind.ObjectMapper 7 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 8 | import com.lagradost.cloudstream3.USER_AGENT 9 | import com.lagradost.nicehttp.Requests 10 | import com.lagradost.nicehttp.ResponseParser 11 | import javax.crypto.Cipher 12 | import javax.crypto.spec.SecretKeySpec 13 | import kotlin.reflect.KClass 14 | 15 | val JSONParser = object : ResponseParser { 16 | val mapper: ObjectMapper = jacksonObjectMapper() 17 | .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) 18 | .configure(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true) 19 | .configure(JsonReadFeature.ALLOW_UNQUOTED_FIELD_NAMES.mappedFeature(), true) 20 | .configure(JsonReadFeature.ALLOW_TRAILING_COMMA.mappedFeature(), true) 21 | 22 | override fun parse(text: String, kClass: KClass): T { 23 | return mapper.readValue(text, kClass.java) 24 | } 25 | 26 | override fun parseSafe(text: String, kClass: KClass): T? { 27 | return try { 28 | mapper.readValue(text, kClass.java) 29 | } catch (e: Exception) { 30 | null 31 | } 32 | } 33 | 34 | override fun writeValueAsString(obj: Any): String { 35 | return mapper.writeValueAsString(obj) 36 | } 37 | } 38 | 39 | inline fun parseJson(text: String): T { 40 | return JSONParser.parse(text, T::class) 41 | } 42 | 43 | inline fun tryParseJson(text: String): T? { 44 | return try { 45 | return JSONParser.parseSafe(text, T::class) 46 | } catch (e: Exception) { 47 | e.printStackTrace() 48 | null 49 | } 50 | } 51 | 52 | val app = Requests(responseParser = JSONParser).apply { 53 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 54 | } 55 | 56 | fun String.substring(left: String, right: String): String { 57 | return substringAfter(left).substringBefore(right) 58 | } 59 | 60 | /** 61 | * Escape解码 62 | * 63 | * @param content 被转义的内容 64 | * @return 解码后的字符串 65 | */ 66 | fun unescape(content: String): String { 67 | if (content.isBlank()) { 68 | return content 69 | } 70 | val tmp = StringBuilder(content.length) 71 | var lastPos = 0 72 | var pos: Int 73 | var ch: Char 74 | while (lastPos < content.length) { 75 | pos = content.indexOf("%", lastPos) 76 | if (pos == lastPos) { 77 | if (content[pos + 1] == 'u') { 78 | ch = content.substring(pos + 2, pos + 6).toInt(16).toChar() 79 | tmp.append(ch) 80 | lastPos = pos + 6 81 | } else { 82 | ch = content.substring(pos + 1, pos + 3).toInt(16).toChar() 83 | tmp.append(ch) 84 | lastPos = pos + 3 85 | } 86 | } else { 87 | lastPos = if (pos == -1) { 88 | tmp.append(content.substring(lastPos)) 89 | content.length 90 | } else { 91 | tmp.append(content, lastPos, pos) 92 | pos 93 | } 94 | } 95 | } 96 | return tmp.toString() 97 | } 98 | 99 | @SuppressLint("GetInstance") 100 | fun aesEncrypt(data: ByteArray, key: ByteArray): ByteArray { 101 | val aes = Cipher.getInstance("AES/ECB/PKCS5Padding") 102 | aes.init(Cipher.ENCRYPT_MODE, SecretKeySpec(key, "AES")) 103 | return aes.doFinal(data) 104 | } 105 | -------------------------------------------------------------------------------- /archived/Kshow123Provider/src/main/kotlin/com/horis/cloudstreamplugins/StreamSB.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | import com.lagradost.cloudstream3.SubtitleFile 5 | import com.lagradost.cloudstream3.app 6 | import com.lagradost.cloudstream3.utils.ExtractorApi 7 | import com.lagradost.cloudstream3.utils.ExtractorLink 8 | import com.lagradost.cloudstream3.utils.M3u8Helper 9 | 10 | class Streamsss : StreamSB2() { 11 | override var mainUrl = "https://streamsss.net" 12 | } 13 | 14 | 15 | open class StreamSB2 : ExtractorApi() { 16 | override var name = "StreamSB" 17 | override var mainUrl = "https://watchsb.com" 18 | override val requiresReferer = false 19 | 20 | private val hexArray = "0123456789ABCDEF".toCharArray() 21 | 22 | private fun bytesToHex(bytes: ByteArray): String { 23 | val hexChars = CharArray(bytes.size * 2) 24 | for (j in bytes.indices) { 25 | val v = bytes[j].toInt() and 0xFF 26 | 27 | hexChars[j * 2] = hexArray[v ushr 4] 28 | hexChars[j * 2 + 1] = hexArray[v and 0x0F] 29 | } 30 | return String(hexChars) 31 | } 32 | 33 | data class Subs ( 34 | @JsonProperty("file") val file: String? = null, 35 | @JsonProperty("label") val label: String? = null, 36 | ) 37 | 38 | data class StreamData ( 39 | @JsonProperty("file") val file: String, 40 | @JsonProperty("cdn_img") val cdnImg: String, 41 | @JsonProperty("hash") val hash: String, 42 | @JsonProperty("subs") val subs: ArrayList? = arrayListOf(), 43 | @JsonProperty("length") val length: String, 44 | @JsonProperty("id") val id: String, 45 | @JsonProperty("title") val title: String, 46 | @JsonProperty("backup") val backup: String, 47 | ) 48 | 49 | data class Main ( 50 | @JsonProperty("stream_data") val streamData: StreamData, 51 | @JsonProperty("status_code") val statusCode: Int, 52 | ) 53 | 54 | override suspend fun getUrl( 55 | url: String, 56 | referer: String?, 57 | subtitleCallback: (SubtitleFile) -> Unit, 58 | callback: (ExtractorLink) -> Unit 59 | ) { 60 | val regexID = 61 | Regex("(embed-[a-zA-Z0-9]{0,8}[a-zA-Z0-9_-]+|/e/[a-zA-Z0-9]{0,8}[a-zA-Z0-9_-]+)") 62 | val id = regexID.findAll(url).map { 63 | it.value.replace(Regex("(embed-|/e/)"), "") 64 | }.first() 65 | // val master = "$mainUrl/sources48/6d6144797752744a454267617c7c${bytesToHex.lowercase()}7c7c4e61755a56456f34385243727c7c73747265616d7362/6b4a33767968506e4e71374f7c7c343837323439333133333462353935333633373836643638376337633462333634663539343137373761333635313533333835333763376333393636363133393635366136323733343435323332376137633763373337343732363536313664373336327c7c504d754478413835306633797c7c73747265616d7362" 66 | val master = "$mainUrl/sources49/" + bytesToHex("||$id||||streamsb".toByteArray()) + "/" 67 | val headers = mapOf( 68 | "watchsb" to "sbstream", 69 | ) 70 | val mapped = app.get( 71 | master.lowercase(), 72 | headers = headers, 73 | referer = url, 74 | ).parsedSafe
() 75 | // val urlmain = mapped.streamData.file.substringBefore("/hls/") 76 | M3u8Helper.generateM3u8( 77 | name, 78 | mapped?.streamData?.file ?: return, 79 | url, 80 | headers = headers 81 | ).forEach(callback) 82 | 83 | mapped.streamData.subs?.map {sub -> 84 | subtitleCallback.invoke( 85 | SubtitleFile( 86 | sub.label.toString(), 87 | sub.file ?: return@map null, 88 | ) 89 | ) 90 | } 91 | } 92 | } -------------------------------------------------------------------------------- /archived/Kshow123Provider/src/main/kotlin/com/horis/cloudstreamplugins/Kshow123Provider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.* 4 | import com.lagradost.cloudstream3.utils.AppUtils.toJson 5 | import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson 6 | import com.lagradost.cloudstream3.utils.ExtractorLink 7 | import com.lagradost.cloudstream3.utils.loadExtractor 8 | import org.jsoup.nodes.Element 9 | 10 | class Kshow123Provider : MainAPI() { 11 | override val supportedTypes = setOf( 12 | TvType.AsianDrama 13 | ) 14 | override var lang = "en" 15 | 16 | override var mainUrl = "https://kshow123online.com" 17 | override var name = "Kshow123" 18 | 19 | override val hasMainPage = true 20 | 21 | override val mainPage = mainPageOf( 22 | mainUrl to "Recent Posts", 23 | ) 24 | 25 | override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? { 26 | val url = if (page == 1) { 27 | request.data 28 | } else { 29 | "${request.data}/page/$page/" 30 | } 31 | 32 | val document = app.get(url, referer = "$mainUrl/").document 33 | val items = document.select(".posts-items > li").mapNotNull { 34 | it.toSearchResult() 35 | } 36 | 37 | return newHomePageResponse(request.name, items) 38 | } 39 | 40 | private fun Element.toSearchResult(): SearchResponse? { 41 | val title = selectFirst("h2")?.text()?.trim() ?: return null 42 | val href = fixUrlNull(selectFirst("a")?.attr("href")) ?: return null 43 | val posterUrl = fixUrlNull(selectFirst("img")?.attr("src")) 44 | 45 | return newAnimeSearchResponse(title, LoadUrl(href, posterUrl).toJson()) { 46 | this.posterUrl = posterUrl 47 | } 48 | } 49 | 50 | 51 | override suspend fun search(query: String): List { 52 | val url = "$mainUrl/?s=$query" 53 | val document = app.get(url, referer = "$mainUrl/").document 54 | 55 | val items = document.select("#posts-container > li").mapNotNull { 56 | val a = it.selectFirst("a") ?: return@mapNotNull null 57 | val name = it.selectFirst("h2")?.text() ?: return@mapNotNull null 58 | val posterUrl = fixUrlNull(it.selectFirst("img")?.attr("src")) 59 | val href = a.attr("href") 60 | newMovieSearchResponse(name, LoadUrl(href, posterUrl).toJson()) { 61 | this.posterUrl = posterUrl 62 | } 63 | } 64 | return items 65 | } 66 | 67 | override suspend fun load(url: String): LoadResponse? { 68 | val d = tryParseJson(url) ?: return null 69 | val document = app.get(d.url, referer = "$mainUrl/").document 70 | val title = document.selectFirst("h1")?.text()?.trim() ?: return null 71 | 72 | val episodes = arrayListOf(newEpisode(d.url) { 73 | name = title 74 | }) 75 | 76 | return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { 77 | posterUrl = d.posterUrl 78 | } 79 | } 80 | 81 | override suspend fun loadLinks( 82 | data: String, 83 | isCasting: Boolean, 84 | subtitleCallback: (SubtitleFile) -> Unit, 85 | callback: (ExtractorLink) -> Unit 86 | ): Boolean { 87 | val doc = app.get(data, verify = false).document 88 | val src = doc.select("iframe").map { it.attr("src") } 89 | .firstOrNull { it.contains("streaming.php") } 90 | ?.substringBefore("&") ?: return false 91 | loadExtractor(src, subtitleCallback, callback) 92 | return true 93 | } 94 | 95 | data class LoadUrl( 96 | val url: String, 97 | val posterUrl: String? 98 | ) 99 | 100 | } 101 | -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/providers/JiangNanProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.providers 2 | 3 | import com.horis.cloudstreamplugins.BaseVodProvider 4 | import com.horis.cloudstreamplugins.PlayData 5 | import com.horis.cloudstreamplugins.app 6 | import com.horis.cloudstreamplugins.makeApiExtractor 7 | import com.lagradost.cloudstream3.SubtitleFile 8 | import com.lagradost.cloudstream3.utils.AppUtils 9 | import com.lagradost.cloudstream3.utils.ExtractorLink 10 | import com.lagradost.cloudstream3.utils.Qualities 11 | import okhttp3.FormBody 12 | import okio.ByteString.Companion.encode 13 | import java.net.URLDecoder 14 | 15 | 16 | class JiangNanProvider : BaseVodProvider() { 17 | 18 | override var mainUrl = "https://api.yjiexi.com/provide/xml.html" 19 | override var name = "江南影视" 20 | override val apiExtractor by lazy { 21 | makeApiExtractor(mainUrl, responseType = 1) 22 | } 23 | override val filterM3U8Url = false 24 | //override val playFromFilter = hashSetOf("youku", "qiyi") 25 | 26 | override suspend fun loadLinks( 27 | data: String, 28 | isCasting: Boolean, 29 | subtitleCallback: (SubtitleFile) -> Unit, 30 | callback: (ExtractorLink) -> Unit 31 | ): Boolean { 32 | val playData = AppUtils.parseJson(data) 33 | val link = "https://player.yjiexi.com/player?url=${playData.url}" 34 | val res = app.get(link) 35 | val vid: String = "vid: '(.*?)'".toRegex().find(res.text)!!.groupValues[1] 36 | val url: String = "(?() 62 | 63 | callback( 64 | ExtractorLink( 65 | name, 66 | playData.server, 67 | result.playurl, 68 | link, 69 | Qualities.Unknown.value, 70 | result.type == "m3u8" 71 | ) 72 | ) 73 | 74 | return true 75 | } 76 | 77 | private fun createSign( 78 | bodyMap: MutableMap = mutableMapOf(), 79 | key: String = "JNPLAYER789", 80 | t: Long = 0 81 | ): String { 82 | var timestamp = (System.currentTimeMillis() / 1000).toString() 83 | if (t > 0) timestamp = t.toString() 84 | bodyMap["t"] = timestamp 85 | bodyMap["tkey"] = "$key$timestamp".encode().md5().hex() 86 | val body = bodyMap.entries.sortedBy { it.key } 87 | .fold("") { last, (key, value) -> 88 | if (key.isEmpty() || value.isEmpty() || key == "sign") last else 89 | "$last$key=$value&" 90 | }.removeSuffix("&") 91 | bodyMap.remove("tkey") 92 | return "$body$key".encode().md5().hex().uppercase() 93 | } 94 | 95 | private fun decodeBackSlashX(s: String) : String { 96 | return URLDecoder.decode(s.replace("\\x", "%"), "utf-8") 97 | } 98 | 99 | data class JNResult( 100 | val playurl: String, 101 | val type: String 102 | ) 103 | } 104 | -------------------------------------------------------------------------------- /archived/AnimexinaxProvider/src/main/kotlin/com/horis/cloudstreamplugins/AnimexinaxProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.* 4 | import com.lagradost.cloudstream3.utils.ExtractorLink 5 | import com.lagradost.cloudstream3.utils.loadExtractor 6 | import org.jsoup.nodes.Element 7 | 8 | class AnimexinaxProvider : MainAPI() { 9 | override val supportedTypes = setOf( 10 | TvType.AnimeMovie, 11 | TvType.OVA, 12 | TvType.Anime, 13 | ) 14 | override var lang = "en" 15 | 16 | override var mainUrl = "https://animexinax.com" 17 | override var name = "Animexinax" 18 | 19 | override val hasMainPage = true 20 | 21 | override val mainPage = mainPageOf( 22 | mainUrl to "Latest Release", 23 | ) 24 | 25 | override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? { 26 | val url = if (page == 1) { 27 | request.data 28 | } else { 29 | "${request.data}/page/$page/" 30 | } 31 | 32 | val document = app.get(url, referer = "$mainUrl/").document 33 | val items = document.select(".listupd article").mapNotNull { 34 | it.toHomePageResult() 35 | } 36 | 37 | return newHomePageResponse(request.name, items) 38 | } 39 | 40 | private fun Element.toHomePageResult(): SearchResponse? { 41 | val title = selectFirst(".eggtitle")?.text()?.trim() ?: return null 42 | val href = fixUrlNull(selectFirst("a")?.attr("href")) ?: return null 43 | val posterUrl = fixUrlNull(selectFirst("img")?.attr("src")) 44 | 45 | return newAnimeSearchResponse(title, href) { 46 | this.posterUrl = posterUrl 47 | } 48 | } 49 | 50 | 51 | override suspend fun search(query: String): List { 52 | val url = "$mainUrl/?s=$query" 53 | val document = app.get(url, referer = "$mainUrl/").document 54 | 55 | val items = document.select(".listupd article").mapNotNull { 56 | it.toHomePageResult() 57 | } 58 | return items 59 | } 60 | 61 | override suspend fun load(url: String): LoadResponse? { 62 | var doc = app.get(url, referer = "$mainUrl/").document 63 | val lis = doc.select(".ts-breadcrumb ol li") 64 | val isVideoPage = lis.size > 2 65 | if (isVideoPage) { 66 | val homePageUrl = lis[1].select("a").attr("href") 67 | doc = app.get(homePageUrl, referer = "$mainUrl/").document 68 | } 69 | val title = doc.selectFirst("h1")?.text()?.trim() ?: return null 70 | 71 | val episodes = doc.select(".eplister ul li a").mapNotNull { 72 | val href = fixUrl(it?.attr("href") ?: return@mapNotNull null) 73 | val name = it.select(".epl-num").text() 74 | newEpisode(href) { 75 | this.name = name 76 | } 77 | }.reversed() 78 | 79 | return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { 80 | posterUrl = doc.select(".thumb img").attr("src") 81 | plot = doc.select(".entry-content").text() 82 | tags = doc.select(".genxed a").map { it.text() } 83 | } 84 | } 85 | 86 | override suspend fun loadLinks( 87 | data: String, 88 | isCasting: Boolean, 89 | subtitleCallback: (SubtitleFile) -> Unit, 90 | callback: (ExtractorLink) -> Unit 91 | ): Boolean { 92 | val doc = app.get(data, referer = "$mainUrl/").document 93 | val links = doc.select("select.mirror option") 94 | .asSequence() 95 | .map { it.attr("value") } 96 | .filter { it.isNotBlank() } 97 | .map { base64Decode(it) } 98 | .map { it.substring("src=\"", "\"") } 99 | .map { fixUrl(it) } 100 | .toList() 101 | links.amap { 102 | loadExtractor(it, subtitleCallback, callback) 103 | } 104 | return true 105 | } 106 | 107 | } 108 | -------------------------------------------------------------------------------- /archived/Stream1Provider/src/main/kotlin/com/horis/cloudstreamplugins/Stream1Provider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.* 4 | import com.lagradost.cloudstream3.utils.AppUtils.toJson 5 | import com.lagradost.cloudstream3.utils.ExtractorLink 6 | import com.lagradost.cloudstream3.utils.Qualities 7 | import com.lagradost.nicehttp.Session 8 | import org.jsoup.nodes.Element 9 | import java.util.Calendar 10 | import kotlin.math.roundToInt 11 | 12 | class Stream1Provider : MainAPI() { 13 | override val supportedTypes = setOf( 14 | TvType.Live 15 | ) 16 | override var lang = "en" 17 | 18 | override var mainUrl = "https://1stream.eu" 19 | override var name = "1Stream" 20 | 21 | override val hasMainPage = true 22 | 23 | override val mainPage = mainPageOf( 24 | "/" to "Home", 25 | "/nbastreams" to "NBA streams", 26 | "/nflstreams" to "NFL streams", 27 | "/nhlstreams" to "NHL streams", 28 | "/mlbstreams" to "MLB streams", 29 | "/mmastreams" to "MMA streams", 30 | "/boxingstreams" to "Boxing streams", 31 | "/f1streams" to "Formula 1 Streams" 32 | ) 33 | 34 | override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? { 35 | val doc = app.get("$mainUrl${request.data}").document 36 | val items = doc.select("a.btn").mapNotNull { 37 | it.toSearchResult() 38 | } 39 | 40 | return newHomePageResponse(request.name, items, false) 41 | } 42 | 43 | private fun Element.toSearchResult(): SearchResponse? { 44 | val title = select("h4").text() 45 | val url = attr("href") 46 | val time = select(".media-body p").text() 47 | 48 | return newAnimeSearchResponse(title, Match(title, url, time).toJson()) { 49 | posterUrl = select("img").attr("src") 50 | } 51 | } 52 | 53 | override suspend fun search(query: String): List? { 54 | return null 55 | } 56 | 57 | override suspend fun load(url: String): LoadResponse? { 58 | val match = parseJson(url) 59 | val title = match.name 60 | 61 | val episodes = arrayListOf(newEpisode(match.url) { 62 | name = title 63 | }) 64 | 65 | return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { 66 | plot = match.time 67 | } 68 | } 69 | 70 | override suspend fun loadLinks( 71 | data: String, 72 | isCasting: Boolean, 73 | subtitleCallback: (SubtitleFile) -> Unit, 74 | callback: (ExtractorLink) -> Unit 75 | ): Boolean { 76 | val html = session.get(data, verify = false).text 77 | val url = mainUrl + 78 | html.substring("url: '", "'") + 79 | (Math.random() * 64).roundToInt().toString() 80 | val eventId = html.substring("eventId: \"", "\"") 81 | val token = html.substring("\"_token\": \"", "\"") 82 | val sport = html.substring("sport: '", "'") 83 | val postData = mapOf( 84 | "eventId" to eventId, 85 | "_token" to token, 86 | "sport" to sport 87 | ) 88 | val headers = mapOf( 89 | "X-Requested-With" to "XMLHttpRequest", 90 | "Referer" to data 91 | ) 92 | val stream = session.post(url, headers = headers, data = postData).parsed() 93 | 94 | if (stream.baseurl.isEmpty()) { 95 | return false 96 | } 97 | 98 | val m3u8 = base64Decode(stream.source) 99 | 100 | callback( 101 | ExtractorLink( 102 | name, 103 | name, 104 | m3u8, 105 | "$mainUrl/", 106 | Qualities.Unknown.value, 107 | true 108 | ) 109 | ) 110 | return true 111 | } 112 | 113 | data class StreamInfo( 114 | val baseurl: String, 115 | val source: String 116 | ) 117 | 118 | data class Match( 119 | val name: String, 120 | val url: String, 121 | val time: String 122 | ) 123 | 124 | } 125 | -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/apiextractors/CollectXMLExtractor.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins.apiextractors 2 | 3 | import com.horis.cloudstreamplugins.Category 4 | import com.horis.cloudstreamplugins.Vod 5 | import com.horis.cloudstreamplugins.apis.VodAPI 6 | import com.lagradost.cloudstream3.ErrorLoadingException 7 | import org.jsoup.Jsoup 8 | import org.jsoup.nodes.CDataNode 9 | import org.jsoup.parser.Parser 10 | import java.net.URLEncoder 11 | 12 | class CollectXMLExtractor(val api: VodAPI) : VodAPIExtractor { 13 | var categoryCache: List? = null 14 | 15 | override suspend fun getCategory(limit: Int, skip: Int): List { 16 | categoryCache?.let { return it } 17 | val xml = api.list().text 18 | categoryCache = CategoryList(xml).list?.take(8) 19 | return categoryCache ?: throw ErrorLoadingException("获取分类数据失败") 20 | } 21 | 22 | override suspend fun getVodList( 23 | query: String?, 24 | page: Int, 25 | ids: String?, 26 | type: String?, 27 | pageSize: Int? 28 | ): List? { 29 | val encodedQuery = query?.let { URLEncoder.encode(it, "utf-8") } 30 | val xml = api.list(encodedQuery, page, ids, type, pageSize).text 31 | return VodList(xml).list 32 | } 33 | 34 | override suspend fun getVodListDetail( 35 | query: String?, 36 | page: Int, 37 | ids: String?, 38 | type: String?, 39 | pageSize: Int? 40 | ): List? { 41 | val encodedQuery = query?.let { URLEncoder.encode(it, "utf-8") } 42 | val xml = api.search(encodedQuery, page, ids, type, pageSize).text 43 | return VodList(xml).list 44 | } 45 | 46 | class VodList(xml: String) { 47 | var list: List? = null 48 | 49 | init { 50 | val doc = Jsoup.parse(xml, Parser.xmlParser()) 51 | list = doc.select("video").map { 52 | val id = it.selectFirst("id")?.text()?.toInt() 53 | val typeId = it.selectFirst("tid")?.text()?.toInt() 54 | val name = (it.selectFirst("name")?.childNode(0) as CDataNode).text() 55 | val pic = it.selectFirst("pic")?.text() 56 | val typeName = it.selectFirst("type")?.text() 57 | val lang = it.selectFirst("lang")?.text() 58 | val area = it.selectFirst("area")?.text() 59 | val year = it.selectFirst("year")?.text() 60 | val remarks = (it.selectFirst("note")?.childNode(0) as CDataNode).text() 61 | val actor = (it.selectFirst("actor")?.childNode(0) as CDataNode).text() 62 | val director = (it.selectFirst("director")?.childNode(0) as CDataNode).text() 63 | val playData = it.select("dl dd") 64 | val playFrom = playData.joinToString("$$$") { el -> 65 | el.attr("flag") 66 | } 67 | val playUrl = playData.joinToString("$$$") { el -> 68 | (el.childNode(0) as CDataNode).text() 69 | } 70 | val blurb = (it.selectFirst("des")?.childNode(0) as CDataNode).text() 71 | val time = it.selectFirst("last")?.text() 72 | Vod( 73 | id = id, 74 | typeId = typeId, 75 | name = name, 76 | pic = pic, 77 | actor = actor, 78 | director = director, 79 | blurb = blurb, 80 | remarks = remarks, 81 | area = area, 82 | lang = lang, 83 | year = year, 84 | time = time, 85 | playFrom = playFrom, 86 | playUrl = playUrl, 87 | typeName = typeName 88 | ) 89 | } 90 | } 91 | } 92 | 93 | class CategoryList(xml: String) { 94 | var list: List? = null 95 | 96 | init { 97 | val doc = Jsoup.parse(xml, Parser.xmlParser()) 98 | list = doc.select("class ty").map { 99 | Category(it.attr("id").toInt(), it.text()) 100 | } 101 | } 102 | } 103 | } -------------------------------------------------------------------------------- /DramacoolProvider/src/main/kotlin/com/horis/cloudstreamplugins/DramacoolProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.* 4 | import com.lagradost.cloudstream3.utils.AppUtils.toJson 5 | import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson 6 | import com.lagradost.cloudstream3.utils.ExtractorLink 7 | import com.lagradost.cloudstream3.utils.loadExtractor 8 | import org.jsoup.nodes.Element 9 | 10 | class DramacoolProvider : MainAPI() { 11 | override val supportedTypes = setOf( 12 | TvType.AsianDrama 13 | ) 14 | override var lang = "en" 15 | 16 | override var mainUrl = "https://dramacool.city" 17 | override var name = "Dramacool" 18 | 19 | override val hasMainPage = true 20 | 21 | override val mainPage = mainPageOf( 22 | "${mainUrl}/dramas/" to "Drama", 23 | "${mainUrl}/movies/" to "Movies", 24 | "${mainUrl}/k-shows/" to "KShow", 25 | "${mainUrl}/most-watched/" to "Popular Dramas", 26 | ) 27 | 28 | override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? { 29 | val url = if (page == 1) { 30 | request.data 31 | } else { 32 | "${request.data}/page/$page/" 33 | } 34 | 35 | val document = app.get(url, referer = "$mainUrl/").document 36 | val items = document.select(".box > li").mapNotNull { 37 | it.toSearchResult() 38 | } 39 | 40 | return newHomePageResponse(request.name, items) 41 | } 42 | 43 | private fun Element.toSearchResult(): SearchResponse? { 44 | val title = selectFirst("h3")?.text()?.trim() ?: return null 45 | val href = fixUrlNull(selectFirst("a")?.attr("href")) ?: return null 46 | val posterUrl = fixUrlNull(selectFirst("img")?.attr("src")) 47 | 48 | return newAnimeSearchResponse(title, LoadUrl(href, posterUrl).toJson()) { 49 | this.posterUrl = posterUrl 50 | } 51 | } 52 | 53 | 54 | override suspend fun search(query: String): List { 55 | val url = "$mainUrl/?s=$query" 56 | val document = app.get(url, referer = "$mainUrl/").document 57 | 58 | val items = document.select(".list-thumb li").mapNotNull { 59 | val a = it.selectFirst("a") ?: return@mapNotNull null 60 | val name = it.selectFirst("h2")?.text() ?: return@mapNotNull null 61 | val posterUrl = fixUrlNull(it.selectFirst("img")?.attr("src")) 62 | val href = a.attr("href") 63 | newMovieSearchResponse(name, LoadUrl(href, posterUrl).toJson()) { 64 | this.posterUrl = posterUrl 65 | } 66 | } 67 | return items 68 | } 69 | 70 | override suspend fun load(url: String): LoadResponse? { 71 | val d = tryParseJson(url) ?: return null 72 | val document = app.get(d.url, referer = "$mainUrl/").document 73 | val title = document.selectFirst("h1")?.text()?.trim() ?: return null 74 | 75 | val episodes = document.select("#all-episodes ul li").mapNotNull { el -> 76 | el.select("a").mapNotNull { 77 | val href = fixUrl(it.attr("data-source")) 78 | newEpisode(href) { 79 | name = it.text().trim() 80 | } 81 | } 82 | }.flatten() 83 | 84 | 85 | return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { 86 | posterUrl = d.posterUrl 87 | } 88 | } 89 | 90 | override suspend fun loadLinks( 91 | data: String, 92 | isCasting: Boolean, 93 | subtitleCallback: (SubtitleFile) -> Unit, 94 | callback: (ExtractorLink) -> Unit 95 | ): Boolean { 96 | val id = data.substringAfter("id=") 97 | val json = app.get("https://dramasb.com/stream?id=$id", verify = false).text 98 | val linksRegex = "\"link\":\"(.*?)\"".toRegex() 99 | val servers = linksRegex.findAll(json).map { 100 | it.groupValues[1].replace("\\/", "/") 101 | }.toList() 102 | 103 | servers.amap { 104 | loadExtractor(it, subtitleCallback, callback) 105 | } 106 | return true 107 | } 108 | 109 | data class LoadUrl( 110 | val url: String, 111 | val posterUrl: String? 112 | ) 113 | 114 | } 115 | -------------------------------------------------------------------------------- /SuperVod/src/main/kotlin/com/horis/cloudstreamplugins/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.core.json.JsonReadFeature 4 | import com.fasterxml.jackson.databind.DeserializationFeature 5 | import com.fasterxml.jackson.databind.ObjectMapper 6 | import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper 7 | import com.horis.cloudstreamplugins.apiextractors.CollectAPIExtractor 8 | import com.horis.cloudstreamplugins.apiextractors.CollectXMLExtractor 9 | import com.horis.cloudstreamplugins.apiextractors.VodAPIExtractor 10 | import com.horis.cloudstreamplugins.apis.CollectAPI 11 | import com.lagradost.cloudstream3.USER_AGENT 12 | import com.lagradost.nicehttp.Requests 13 | import com.lagradost.nicehttp.ResponseParser 14 | import javax.crypto.Cipher 15 | import javax.crypto.spec.IvParameterSpec 16 | import javax.crypto.spec.SecretKeySpec 17 | import kotlin.reflect.KClass 18 | 19 | val JSONParser = object : ResponseParser { 20 | val mapper: ObjectMapper = jacksonObjectMapper().configure( 21 | DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false 22 | ).configure( 23 | JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true 24 | ) 25 | 26 | override fun parse(text: String, kClass: KClass): T { 27 | return mapper.readValue(text, kClass.java) 28 | } 29 | 30 | override fun parseSafe(text: String, kClass: KClass): T? { 31 | return try { 32 | mapper.readValue(text, kClass.java) 33 | } catch (e: Exception) { 34 | null 35 | } 36 | } 37 | 38 | override fun writeValueAsString(obj: Any): String { 39 | return mapper.writeValueAsString(obj) 40 | } 41 | } 42 | 43 | inline fun parseJson(text: String): T { 44 | return JSONParser.parse(text, T::class) 45 | } 46 | 47 | inline fun tryParseJson(text: String): T? { 48 | return try { 49 | return JSONParser.parseSafe(text, T::class) 50 | } catch (e: Exception) { 51 | e.printStackTrace() 52 | null 53 | } 54 | } 55 | 56 | val app = Requests(responseParser = JSONParser).apply { 57 | defaultHeaders = mapOf("User-Agent" to USER_AGENT) 58 | } 59 | 60 | //var activityRef: WeakReference? = null 61 | //val activity get() = activityRef?.get() 62 | // 63 | //fun showToast(message: String, duration: Int? = null) { 64 | // val activity = activity ?: return 65 | // CommonActivity.showToast(activity, message, duration) 66 | //} 67 | 68 | /** 69 | * Escape解码 70 | * 71 | * @param content 被转义的内容 72 | * @return 解码后的字符串 73 | */ 74 | fun unescape(content: String): String { 75 | if (content.isBlank()) { 76 | return content 77 | } 78 | val tmp = StringBuilder(content.length) 79 | var lastPos = 0 80 | var pos: Int 81 | var ch: Char 82 | while (lastPos < content.length) { 83 | pos = content.indexOf("%", lastPos) 84 | if (pos == lastPos) { 85 | if (content[pos + 1] == 'u') { 86 | ch = content.substring(pos + 2, pos + 6).toInt(16).toChar() 87 | tmp.append(ch) 88 | lastPos = pos + 6 89 | } else { 90 | ch = content.substring(pos + 1, pos + 3).toInt(16).toChar() 91 | tmp.append(ch) 92 | lastPos = pos + 3 93 | } 94 | } else { 95 | lastPos = if (pos == -1) { 96 | tmp.append(content.substring(lastPos)) 97 | content.length 98 | } else { 99 | tmp.append(content, lastPos, pos) 100 | pos 101 | } 102 | } 103 | } 104 | return tmp.toString() 105 | } 106 | 107 | fun makeApiExtractor(apiUrl: String, apiType: Int = 0, responseType: Int = 0): VodAPIExtractor { 108 | val api = when (apiType) { 109 | 0 -> CollectAPI(apiUrl) 110 | else -> throw AssertionError("apiType参数错误") 111 | } 112 | val apiExtractor = when (responseType) { 113 | 0 -> CollectAPIExtractor(api) 114 | 1 -> CollectXMLExtractor(api) 115 | else -> throw AssertionError("responseType参数错误") 116 | } 117 | return apiExtractor 118 | } 119 | 120 | fun aesDecrypt(data: ByteArray, key: ByteArray, iv: ByteArray): ByteArray { 121 | val aes = Cipher.getInstance("AES/CBC/PKCS5Padding") 122 | aes.init(Cipher.DECRYPT_MODE, SecretKeySpec(key, "AES"), IvParameterSpec(iv)) 123 | return aes.doFinal(data) 124 | } 125 | -------------------------------------------------------------------------------- /archived/BollywoodProvider/src/main/kotlin/com/horis/cloudstreamplugins/TGArchiveProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.* 4 | import com.lagradost.cloudstream3.utils.AppUtils.parseJson 5 | import com.lagradost.cloudstream3.utils.AppUtils.toJson 6 | import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson 7 | import com.lagradost.cloudstream3.utils.ExtractorLink 8 | import com.lagradost.cloudstream3.utils.Qualities 9 | import okhttp3.Interceptor 10 | import okhttp3.Response 11 | import org.w3c.dom.Document 12 | 13 | class TGArchiveProvider : MainAPI() { 14 | override val supportedTypes = setOf( 15 | TvType.Movie, 16 | TvType.TvSeries, 17 | ) 18 | override var lang = "en" 19 | 20 | override var mainUrl = "https://tgarchive.eu.org" 21 | override var name = "TGArchive" 22 | 23 | override val hasMainPage = true 24 | 25 | private val headers = mapOf( 26 | "Referer" to "$mainUrl/", 27 | ) 28 | 29 | private val api = "https://api.tgarchive.superfastsearch.zindex.eu.org" 30 | private val downloadApi = "https://hashhackers.dltelegram.workers.dev/" 31 | 32 | override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? { 33 | return newHomePageResponse("Home", getFiles(page).toSearchResponseList()) 34 | } 35 | 36 | override suspend fun search(query: String): List? { 37 | return app.get("$api/search?name=$query&page=1", headers = headers) 38 | .parsed() 39 | .documents 40 | .toSearchResponseList() 41 | } 42 | 43 | override suspend fun load(url: String): LoadResponse? { 44 | val file = tryParseJson(url) ?: return null 45 | val title = file.name 46 | 47 | val episodes = arrayListOf(newEpisode(file) { 48 | name = title 49 | }) 50 | 51 | return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) 52 | } 53 | 54 | override suspend fun loadLinks( 55 | data: String, 56 | isCasting: Boolean, 57 | subtitleCallback: (SubtitleFile) -> Unit, 58 | callback: (ExtractorLink) -> Unit 59 | ): Boolean { 60 | val file = parseJson(data) 61 | val token = getToken() 62 | val path = "$downloadApi/tgarchive/${file._id}?token=$token" 63 | callback( 64 | ExtractorLink( 65 | name, 66 | name, 67 | path, 68 | "$mainUrl/", 69 | Qualities.Unknown.value, 70 | ) 71 | ) 72 | return true 73 | } 74 | 75 | private suspend fun getToken(): String { 76 | val regex = """var newtime = "(.*?)"""".toRegex() 77 | val js = app.get( 78 | "https://geolocation.zindex.eu.org/api.js", 79 | referer = "$mainUrl/", 80 | ).text 81 | val match = regex.find(js) ?: throw ErrorLoadingException("parse api config fail") 82 | val newTime = match.groupValues[1] 83 | return newTime.reversed() 84 | } 85 | 86 | private fun List.toSearchResponseList(): List { 87 | return filter { it.name.contains("(?i)\\.(mkv|mp4)$".toRegex()) }.map { 88 | newAnimeSearchResponse(it.name, it.toJson()) 89 | } 90 | } 91 | 92 | // @Suppress("ObjectLiteralToLambda") 93 | // override fun getVideoInterceptor(extractorLink: ExtractorLink): Interceptor { 94 | // return object : Interceptor { 95 | // override fun intercept(chain: Interceptor.Chain): Response { 96 | // val request = chain.request() 97 | // .newBuilder() 98 | // .removeHeader("referer") 99 | // .build() 100 | // return chain.proceed(request) 101 | // } 102 | // } 103 | // } 104 | 105 | private fun error(msg: String = "加载数据失败"): Nothing { 106 | throw ErrorLoadingException(msg) 107 | } 108 | 109 | private suspend fun getFiles(page: Int = 1): List { 110 | return app.get("$api/index?page=$page", headers = headers) 111 | .parsed() 112 | .documents 113 | } 114 | 115 | data class GDIndex( 116 | val documents: List, 117 | val page: Int 118 | ) 119 | 120 | data class GDFile( 121 | val name: String, 122 | val _id: String, 123 | ) 124 | 125 | } 126 | -------------------------------------------------------------------------------- /archived/AnimehubProvider/src/main/kotlin/com/horis/cloudstreamplugins/AnimehubProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.* 4 | import com.lagradost.cloudstream3.utils.AppUtils.toJson 5 | import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson 6 | import com.lagradost.cloudstream3.utils.ExtractorLink 7 | import com.lagradost.cloudstream3.utils.loadExtractor 8 | import org.jsoup.Jsoup 9 | import org.jsoup.nodes.Element 10 | 11 | class AnimehubProvider : MainAPI() { 12 | override val supportedTypes = setOf( 13 | TvType.AnimeMovie, 14 | TvType.OVA, 15 | TvType.Anime, 16 | ) 17 | override var lang = "en" 18 | 19 | override var mainUrl = "https://123animehub.cc" 20 | override var name = "Animehub" 21 | 22 | override val hasMainPage = true 23 | 24 | override val mainPage = mainPageOf( 25 | "$mainUrl/home" to "Recently Updated", 26 | "$mainUrl/type/tv%20series" to "Tv Series", 27 | "$mainUrl/type/movies" to "Movies", 28 | "$mainUrl/type/ona" to "Ona" 29 | ) 30 | 31 | override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? { 32 | val url = if (page == 1) { 33 | request.data 34 | } else { 35 | "${request.data}/page/$page/" 36 | } 37 | 38 | val document = app.get(url, referer = "$mainUrl/").document 39 | val items = document.select(".film-list > .item").mapNotNull { 40 | it.toHomePageResult() 41 | } 42 | 43 | return newHomePageResponse(request.name, items) 44 | } 45 | 46 | private fun Element.toHomePageResult(): SearchResponse? { 47 | val title = select("a").lastOrNull()?.text()?.trim() ?: return null 48 | val href = fixUrlNull(selectFirst("a")?.attr("href")) ?: return null 49 | val posterUrl = fixUrlNull(selectFirst("img")?.attr("data-src")) 50 | 51 | return newAnimeSearchResponse(title, LoadUrl(href, posterUrl).toJson()) { 52 | this.posterUrl = posterUrl 53 | } 54 | } 55 | 56 | 57 | override suspend fun search(query: String): List { 58 | val url = "$mainUrl/search?keyword=$query" 59 | val document = app.get(url, referer = "$mainUrl/").document 60 | 61 | val items = document.select(".film-list > .item").mapNotNull { 62 | it.toHomePageResult() 63 | } 64 | return items 65 | } 66 | 67 | override suspend fun load(url: String): LoadResponse? { 68 | val d = tryParseJson(url) ?: return null 69 | val document = app.get(d.url, referer = "$mainUrl/").document 70 | val title = document.selectFirst("h1")?.text()?.trim() ?: return null 71 | 72 | val id = document.select("#servers-container").attr("data-id") 73 | 74 | val doc = Jsoup.parse( 75 | app.get( 76 | "https://123animehub.cc/ajax/film/sv?id=$id&ts=001&_=840", 77 | referer = "$mainUrl/" 78 | ).parsedSafe()?.html ?: return null 79 | ) 80 | val server = doc.selectFirst(".mass")?.attr("data-name") ?: return null 81 | 82 | val episodes = doc.select(".episodes li a").mapNotNull { 83 | // val href = fixUrl(it?.attr("href") ?: return@mapNotNull null) 84 | val name = it.text() 85 | val epid = it.attr("data-id") 86 | newEpisode(EpisodeData(epid, server)) { 87 | this.name = name 88 | } 89 | } 90 | 91 | return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { 92 | posterUrl = d.posterUrl 93 | plot = document.select(".desc").text() 94 | year = document.select("dl.meta dt:containsOwn(Released:) + dd").text().toIntOrNull() 95 | } 96 | } 97 | 98 | override suspend fun loadLinks( 99 | data: String, 100 | isCasting: Boolean, 101 | subtitleCallback: (SubtitleFile) -> Unit, 102 | callback: (ExtractorLink) -> Unit 103 | ): Boolean { 104 | val data1 = tryParseJson(data) ?: return false 105 | 106 | val data2 = app.get( 107 | "https://123animehub.cc/ajax/episode/info?epr=${data1.epid}/${data1.server}&ts=001&_=${System.currentTimeMillis()}", 108 | verify = false, 109 | referer = "$mainUrl/" 110 | ).parsedSafe() ?: return false 111 | val newUrl = app.options(data2.target, referer = "$mainUrl/").okhttpResponse.request.url.toString() 112 | loadExtractor(newUrl, subtitleCallback, callback) 113 | return true 114 | } 115 | 116 | data class LoadUrl( 117 | val url: String, 118 | val posterUrl: String? 119 | ) 120 | 121 | data class EpisodeData( 122 | val epid: String, 123 | val server: String 124 | ) 125 | 126 | data class PlayUrl( 127 | val target: String 128 | ) 129 | 130 | data class HtmlData( 131 | val html: String 132 | ) 133 | 134 | } 135 | -------------------------------------------------------------------------------- /archived/DesicinemasProvider/src/main/kotlin/com/horis/cloudstreamplugins/DesicinemasProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.lagradost.cloudstream3.* 4 | import com.lagradost.cloudstream3.utils.ExtractorLink 5 | import okhttp3.Interceptor 6 | import okhttp3.Response 7 | import org.jsoup.nodes.Element 8 | 9 | open class DesicinemasProvider : MainAPI() { 10 | override val supportedTypes = setOf( 11 | TvType.Movie 12 | ) 13 | override var lang = "hi" 14 | 15 | override var mainUrl = "https://desicinemas.tv" 16 | override var name = "Desicinemas" 17 | 18 | override val hasMainPage = true 19 | 20 | override val mainPage = mainPageOf( 21 | "https://desicinemas.tv/" to "Home", 22 | "https://desicinemas.tv/category/punjabi/" to "Punjabi", 23 | "https://desicinemas.tv/category/bollywood/" to "Bollywood", 24 | "https://desicinemas.tv/category/hindi-dubbed/" to "Hindi Dubbed" 25 | ) 26 | 27 | override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? { 28 | val url = if (page == 1 || request.name == "Home") { 29 | request.data 30 | } else { 31 | "${request.data}page/$page/" 32 | } 33 | 34 | val doc = app.get(url, referer = "$mainUrl/").document 35 | 36 | val pages1 = if (request.name == "Home") { 37 | doc.selectFirst(".MovieListTop") 38 | ?.toHomePageList("Most popular") 39 | } else null 40 | 41 | val pages2 = if (request.name == "Home") { 42 | doc.selectFirst("#home-movies-post") 43 | ?.toHomePageList("Latest Movies") 44 | } else null 45 | 46 | val pages3 = if (request.name != "Home") { 47 | doc.selectFirst(".MovieList") 48 | ?.toHomePageList(request.name) 49 | } else null 50 | 51 | val hasNext = request.name != "Home" && pages3?.list?.isNotEmpty() == true 52 | 53 | return HomePageResponse(arrayListOf(pages1, pages2, pages3).filterNotNull(), hasNext) 54 | } 55 | 56 | private fun Element.toHomePageList(name: String): HomePageList { 57 | val items = select("li, .TPostMv") 58 | .mapNotNull { 59 | it.toHomePageResult() 60 | } 61 | return HomePageList(name, items) 62 | } 63 | 64 | private fun Element.toHomePageResult(): SearchResponse? { 65 | val title = selectFirst("h2")?.text()?.trim() ?: return null 66 | val href = fixUrlNull(selectFirst("a")?.attr("href")) ?: return null 67 | val img = selectFirst("img") 68 | val posterUrl = fixUrlNull(img?.attr("data-src")) 69 | 70 | return newAnimeSearchResponse(title, href) { 71 | this.posterUrl = posterUrl 72 | } 73 | } 74 | 75 | 76 | override suspend fun search(query: String): List { 77 | val url = "$mainUrl/?s=$query" 78 | val doc = app.get(url, referer = "$mainUrl/").document 79 | 80 | val items = doc.select(".MovieList li").mapNotNull { 81 | it.toHomePageResult() 82 | } 83 | return items 84 | } 85 | 86 | override suspend fun load(url: String): LoadResponse? { 87 | val doc = app.get(url, referer = "$mainUrl/").document 88 | 89 | val title = doc.selectFirst("h1")?.text()?.trim() ?: return null 90 | val posterUrl = doc.select(".Image img").attr("src") 91 | 92 | val episodes = arrayListOf(newEpisode(url) { 93 | name = title 94 | }) 95 | 96 | return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { 97 | this.posterUrl = fixUrlNull(posterUrl) 98 | plot = doc.selectFirst(".Description p")?.text() 99 | tags = doc.select(".Genre a").map { it.text() } 100 | } 101 | } 102 | 103 | override suspend fun loadLinks( 104 | data: String, 105 | isCasting: Boolean, 106 | subtitleCallback: (SubtitleFile) -> Unit, 107 | callback: (ExtractorLink) -> Unit 108 | ): Boolean { 109 | val doc = app.get(data, referer = "$mainUrl/").document 110 | doc.select(".MovieList .OptionBx").amap { 111 | val link = it.select("a").attr("href") 112 | val name = it.select(".AAIco-dns, .AAIco-equalizer").text() 113 | var doc2 = app.get(link, referer = "$mainUrl/").document 114 | doc2.selectFirst("meta[HTTP-EQUIV=refresh]")?.let { 115 | val url = it.attr("content").substringAfter("URL=") 116 | doc2 = app.get(url, referer = data).document 117 | } 118 | val src = doc2.select("iframe").attr("src") 119 | loadExtractor(src, subtitleCallback, callback, name) 120 | } 121 | return true 122 | } 123 | 124 | override fun getVideoInterceptor(extractorLink: ExtractorLink): Interceptor? { 125 | return object : Interceptor { 126 | override fun intercept(chain: Interceptor.Chain): Response { 127 | return chain.proceed(chain.request()) 128 | } 129 | } 130 | } 131 | 132 | } 133 | -------------------------------------------------------------------------------- /archived/OulevodProvider/src/main/kotlin/com/horis/cloudstreamplugins/OulevodProvider.kt: -------------------------------------------------------------------------------- 1 | package com.horis.cloudstreamplugins 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | import com.lagradost.cloudstream3.* 5 | import com.lagradost.cloudstream3.utils.AppUtils 6 | import com.lagradost.cloudstream3.utils.ExtractorLink 7 | import com.lagradost.cloudstream3.utils.M3u8Helper 8 | import okhttp3.Interceptor 9 | import okhttp3.Response 10 | import org.jsoup.nodes.Element 11 | import org.jsoup.nodes.TextNode 12 | 13 | class OulevodProvider : MainAPI() { 14 | override val supportedTypes = setOf( 15 | TvType.Movie, 16 | TvType.AnimeMovie, 17 | TvType.TvSeries, 18 | TvType.Anime, 19 | TvType.AsianDrama, 20 | TvType.Others 21 | ) 22 | override var lang = "zh" 23 | 24 | override var mainUrl = "https://www.oulevod.tv" 25 | override var name = "欧乐影院" 26 | 27 | override val hasMainPage = true 28 | 29 | override val mainPage = mainPageOf( 30 | "${mainUrl}/index.php/vod/show/id/1" to "电影", 31 | "${mainUrl}/index.php/vod/show/id/2" to "电视剧", 32 | "${mainUrl}/index.php/vod/show/id/3" to "动漫", 33 | "${mainUrl}/index.php/vod/show/id/4" to "综艺", 34 | ) 35 | 36 | override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? { 37 | val url = request.data 38 | val document = app.get(url).document 39 | val items = document.select("ul.hl-vod-list.clearfix > li").mapNotNull { 40 | it.toSearchResult() 41 | } 42 | 43 | return newHomePageResponse(request.name, items) 44 | } 45 | 46 | private fun Element.toSearchResult(): SearchResponse? { 47 | val title = selectFirst(".hl-item-title a")?.text()?.trim() ?: return null 48 | val href = fixUrl(selectFirst("a")?.attr("href").toString()) 49 | val posterUrl = fixUrlNull(selectFirst("a")?.attr("data-original")) 50 | 51 | return newAnimeSearchResponse(title, href, TvType.Movie) { 52 | this.posterUrl = posterUrl 53 | } 54 | } 55 | 56 | 57 | override suspend fun search(query: String): List { 58 | val document = app.get( 59 | "$mainUrl/index.php/vod/search.html?wd=$query&submit=", referer = "$mainUrl/" 60 | ).document 61 | val items = document.select("ul.hl-one-list li").mapNotNull { 62 | val a = it.selectFirst(".hl-item-title a") ?: return@mapNotNull null 63 | val name = a.text().trim() 64 | val url = a.attr("href") 65 | newMovieSearchResponse(name, url) { 66 | posterUrl = fixUrlNull(it.selectFirst("a.hl-item-thumb")?.attr("data-original")) 67 | } 68 | } 69 | return items 70 | } 71 | 72 | override suspend fun load(url: String): LoadResponse? { 73 | val document = app.get(url, referer = "$mainUrl/").document 74 | val title = document.selectFirst(".hl-dc-title")?.text()?.trim() ?: return null 75 | // val tvType = if (document.selectFirst(".hl-text-conch.active")?.text() == "电影") { 76 | // TvType.Movie 77 | // } else { 78 | // TvType.TvSeries 79 | // } 80 | val episodes = document.select(".hl-tabs-box li a").map { 81 | val href = fixUrl(it.attr("href")) 82 | newEpisode(href) { 83 | name = it.text() 84 | } 85 | } 86 | return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { 87 | posterUrl = fixUrlNull(document.selectFirst(".hl-dc-pic span")?.attr("data-original")) 88 | year = (document.select(".hl-full-box ul li").getOrNull(4) 89 | ?.childNode(1) as TextNode).wholeText.toIntOrNull() 90 | plot = (document.select(".hl-full-box ul li").lastOrNull() 91 | ?.childNode(1) as TextNode).wholeText 92 | } 93 | } 94 | 95 | override suspend fun loadLinks( 96 | data: String, 97 | isCasting: Boolean, 98 | subtitleCallback: (SubtitleFile) -> Unit, 99 | callback: (ExtractorLink) -> Unit 100 | ): Boolean { 101 | val document = app.get(data).document 102 | var script = document.select("script").firstOrNull { 103 | it.data().indexOf("var player_aaaa=") > -1 104 | }?.data() 105 | if (script != null) { 106 | script = script.replace("var player_aaaa=", "") 107 | AppUtils.tryParseJson(script)?.let { source -> 108 | source.url ?: return@let 109 | M3u8Helper.generateM3u8(name, source.url, "") 110 | .forEach(callback) 111 | } 112 | } 113 | return true 114 | } 115 | 116 | override fun getVideoInterceptor(extractorLink: ExtractorLink): Interceptor { 117 | return object : Interceptor { 118 | override fun intercept(chain: Interceptor.Chain): Response { 119 | return chain.proceed(chain.request().newBuilder().removeHeader("referer").build()) 120 | } 121 | } 122 | } 123 | 124 | data class Source( 125 | @JsonProperty("url") val url: String? 126 | ) 127 | } --------------------------------------------------------------------------------