mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
[Sora] fixed Gdbot again :*:
This commit is contained in:
parent
2c7860dd99
commit
95b2dbfe9a
4 changed files with 27 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 59
|
version = 60
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -1340,7 +1340,7 @@ object SoraExtractor : SoraStream() {
|
||||||
iframe.apmap { (iframeLink, title) ->
|
iframe.apmap { (iframeLink, title) ->
|
||||||
val size = Regex("(?i)\\s(\\S+gb|mb)").find(title)?.groupValues?.getOrNull(1)
|
val size = Regex("(?i)\\s(\\S+gb|mb)").find(title)?.groupValues?.getOrNull(1)
|
||||||
val gdBotLink = extractGdbot(iframeLink)
|
val gdBotLink = extractGdbot(iframeLink)
|
||||||
val videoLink = extractDrivebot(gdBotLink ?: return@apmap null)
|
val videoLink = extractGdflix(gdBotLink ?: return@apmap null)
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
|
@ -1391,7 +1391,7 @@ object SoraExtractor : SoraStream() {
|
||||||
val videoLink = when {
|
val videoLink = when {
|
||||||
type.contains("gdtot") -> {
|
type.contains("gdtot") -> {
|
||||||
val gdBotLink = extractGdbot(fdLink ?: return@apmap null)
|
val gdBotLink = extractGdbot(fdLink ?: return@apmap null)
|
||||||
extractDrivebot(gdBotLink ?: return@apmap null)
|
extractGdflix(gdBotLink ?: return@apmap null)
|
||||||
}
|
}
|
||||||
type.contains("oiya") -> {
|
type.contains("oiya") -> {
|
||||||
extractOiya(fdLink ?: return@apmap null, qualities)
|
extractOiya(fdLink ?: return@apmap null, qualities)
|
||||||
|
|
|
@ -67,7 +67,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
const val databaseGdriveAPI = "https://databasegdriveplayer.co"
|
const val databaseGdriveAPI = "https://databasegdriveplayer.co"
|
||||||
const val hdMovieBoxAPI = "https://hdmoviebox.net"
|
const val hdMovieBoxAPI = "https://hdmoviebox.net"
|
||||||
const val series9API = "https://series9.la"
|
const val series9API = "https://series9.la"
|
||||||
const val idlixAPI = "https://88.210.12.206"
|
const val idlixAPI = "https://idlixian.com"
|
||||||
const val noverseAPI = "https://www.nollyverse.com"
|
const val noverseAPI = "https://www.nollyverse.com"
|
||||||
const val olgplyAPI = "https://olgply.xyz"
|
const val olgplyAPI = "https://olgply.xyz"
|
||||||
const val uniqueStreamAPI = "https://uniquestream.net"
|
const val uniqueStreamAPI = "https://uniquestream.net"
|
||||||
|
|
|
@ -164,15 +164,32 @@ suspend fun extractDirectDl(url: String): String? {
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun extractDrivebot(url: String): String? {
|
suspend fun extractDrivebot(url: String): String? {
|
||||||
val iframeGdbot =
|
val iframeDrivebot = app.get(url).document.selectFirst("li.flex.flex-col.py-6 a:contains(Drivebot)")
|
||||||
app.get(url).document.selectFirst("li.flex.flex-col.py-6 a:contains(Drivebot)")
|
?.attr("href") ?: return null
|
||||||
?.attr("href")
|
return getDrivebotLink(iframeDrivebot)
|
||||||
val driveDoc = app.get(iframeGdbot ?: return null)
|
}
|
||||||
|
|
||||||
|
suspend fun extractGdflix(url: String): String? {
|
||||||
|
val iframeGdflix = app.get(url).document.selectFirst("li.flex.flex-col.py-6 a:contains(GDFlix Direct)")
|
||||||
|
?.attr("href") ?: return null
|
||||||
|
val base = getBaseUrl(iframeGdflix)
|
||||||
|
|
||||||
|
val gdfDoc = app.get(iframeGdflix).document.selectFirst("script")?.data()?.substringAfter("replace(\"")
|
||||||
|
?.substringBefore("\")")?.let {
|
||||||
|
app.get(fixUrl(it, base)).document
|
||||||
|
}
|
||||||
|
val iframeDrivebot2 = gdfDoc?.selectFirst("a.btn.btn-outline-warning")?.attr("href")
|
||||||
|
|
||||||
|
return getDrivebotLink(iframeDrivebot2)
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun getDrivebotLink(url: String?): String? {
|
||||||
|
val driveDoc = app.get(url ?: return null)
|
||||||
|
|
||||||
val ssid = driveDoc.cookies["PHPSESSID"]
|
val ssid = driveDoc.cookies["PHPSESSID"]
|
||||||
val script = driveDoc.document.selectFirst("script:containsData(var formData)")?.data()
|
val script = driveDoc.document.selectFirst("script:containsData(var formData)")?.data()
|
||||||
|
|
||||||
val baseUrl = getBaseUrl(iframeGdbot)
|
val baseUrl = getBaseUrl(url)
|
||||||
val token = script?.substringAfter("'token', '")?.substringBefore("');")
|
val token = script?.substringAfter("'token', '")?.substringBefore("');")
|
||||||
val link =
|
val link =
|
||||||
script?.substringAfter("fetch('")?.substringBefore("',").let { "$baseUrl$it" }
|
script?.substringAfter("fetch('")?.substringBefore("',").let { "$baseUrl$it" }
|
||||||
|
@ -191,7 +208,7 @@ suspend fun extractDrivebot(url: String): String? {
|
||||||
"Sec-Fetch-Site" to "same-origin"
|
"Sec-Fetch-Site" to "same-origin"
|
||||||
),
|
),
|
||||||
cookies = cookies,
|
cookies = cookies,
|
||||||
referer = iframeGdbot
|
referer = url
|
||||||
).text
|
).text
|
||||||
return tryParseJson<DriveBotLink>(result)?.url
|
return tryParseJson<DriveBotLink>(result)?.url
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue