mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Extractor: added Pichive & Sobreatsesuyp (#1184)
This commit is contained in:
parent
145c42f1c8
commit
e86c926c30
3 changed files with 65 additions and 0 deletions
|
@ -22,6 +22,11 @@ class FourPlayRu : ContentX() {
|
|||
override var mainUrl = "https://four.playru.net"
|
||||
}
|
||||
|
||||
class Pichive : ContentX() {
|
||||
override var name = "Pichive"
|
||||
override var mainUrl = "https://pichive.online"
|
||||
}
|
||||
|
||||
class FourPichive : ContentX() {
|
||||
override var name = "FourPichive"
|
||||
override var mainUrl = "https://four.pichive.online"
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
||||
|
||||
package com.lagradost.cloudstream3.extractors
|
||||
|
||||
import android.util.Log
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.utils.*
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
open class Sobreatsesuyp : ExtractorApi() {
|
||||
override val name = "Sobreatsesuyp"
|
||||
override val mainUrl = "https://sobreatsesuyp.com"
|
||||
override val requiresReferer = true
|
||||
|
||||
override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) {
|
||||
val extRef = referer ?: ""
|
||||
|
||||
val videoReq = app.get(url, referer = extRef).text
|
||||
|
||||
val file = Regex("""file\":\"([^\"]+)""").find(videoReq)?.groupValues?.get(1) ?: throw ErrorLoadingException("File not found")
|
||||
val postLink = "${mainUrl}/" + file.replace("\\", "")
|
||||
val rawList = app.post(postLink, referer = extRef).parsedSafe<List<Any>>() ?: throw ErrorLoadingException("Post link not found")
|
||||
|
||||
val postJson: List<SobreatsesuypVideoData> = rawList.drop(1).map { item ->
|
||||
val mapItem = item as Map<*, *>
|
||||
SobreatsesuypVideoData(
|
||||
title = mapItem["title"] as? String,
|
||||
file = mapItem["file"] as? String
|
||||
)
|
||||
}
|
||||
Log.d("Kekik_${this.name}", "postJson » ${postJson}")
|
||||
|
||||
for (item in postJson) {
|
||||
if (item.file == null || item.title == null) continue
|
||||
|
||||
val fileUrl = "${mainUrl}/playlist/${item.file.substring(1)}.txt"
|
||||
val videoData = app.post(fileUrl, referer = extRef).text
|
||||
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
source = this.name,
|
||||
name = "${this.name} - ${item.title}",
|
||||
url = videoData,
|
||||
referer = extRef,
|
||||
quality = Qualities.Unknown.value,
|
||||
type = INFER_TYPE
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
data class SobreatsesuypVideoData(
|
||||
@JsonProperty("title") val title: String? = null,
|
||||
@JsonProperty("file") val file: String? = null
|
||||
)
|
||||
}
|
|
@ -115,6 +115,7 @@ import com.lagradost.cloudstream3.extractors.Hotlinger
|
|||
import com.lagradost.cloudstream3.extractors.FourCX
|
||||
import com.lagradost.cloudstream3.extractors.PlayRu
|
||||
import com.lagradost.cloudstream3.extractors.FourPlayRu
|
||||
import com.lagradost.cloudstream3.extractors.Pichive
|
||||
import com.lagradost.cloudstream3.extractors.FourPichive
|
||||
import com.lagradost.cloudstream3.extractors.HDMomPlayer
|
||||
import com.lagradost.cloudstream3.extractors.HDPlayerSystem
|
||||
|
@ -124,6 +125,7 @@ import com.lagradost.cloudstream3.extractors.HDStreamAble
|
|||
import com.lagradost.cloudstream3.extractors.RapidVid
|
||||
import com.lagradost.cloudstream3.extractors.TRsTX
|
||||
import com.lagradost.cloudstream3.extractors.VidMoxy
|
||||
import com.lagradost.cloudstream3.extractors.Sobreatsesuyp
|
||||
import com.lagradost.cloudstream3.extractors.PixelDrain
|
||||
import com.lagradost.cloudstream3.extractors.MailRu
|
||||
import com.lagradost.cloudstream3.extractors.Mediafire
|
||||
|
@ -734,6 +736,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
|||
FourCX(),
|
||||
PlayRu(),
|
||||
FourPlayRu(),
|
||||
Pichive(),
|
||||
FourPichive(),
|
||||
HDMomPlayer(),
|
||||
HDPlayerSystem(),
|
||||
|
@ -743,6 +746,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
|||
RapidVid(),
|
||||
TRsTX(),
|
||||
VidMoxy(),
|
||||
Sobreatsesuyp(),
|
||||
PixelDrain(),
|
||||
MailRu(),
|
||||
|
||||
|
|
Loading…
Reference in a new issue