mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
[Sora] weird things but maybe fix missing show in UHD
This commit is contained in:
parent
c3a04a1671
commit
0bfc8b7d91
2 changed files with 17 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 62
|
version = 63
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -1120,6 +1120,9 @@ object SoraExtractor : SoraStream() {
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
|
val url = if(season == null) {
|
||||||
|
"$uhdmoviesAPI/download-${title.fixTitle()}-$year"
|
||||||
|
} else {
|
||||||
val url = "$uhdmoviesAPI/?s=$title"
|
val url = "$uhdmoviesAPI/?s=$title"
|
||||||
var doc = app.get(url).document
|
var doc = app.get(url).document
|
||||||
if (doc.select("title").text() == "Just a moment...") {
|
if (doc.select("title").text() == "Just a moment...") {
|
||||||
|
@ -1128,13 +1131,14 @@ object SoraExtractor : SoraStream() {
|
||||||
val scriptData = doc.select("div.row.gridlove-posts article").map {
|
val scriptData = doc.select("div.row.gridlove-posts article").map {
|
||||||
it.selectFirst("a")?.attr("href") to it.selectFirst("h1")?.text()
|
it.selectFirst("a")?.attr("href") to it.selectFirst("h1")?.text()
|
||||||
}
|
}
|
||||||
val script = if (scriptData.size == 1) {
|
(if (scriptData.size == 1) {
|
||||||
scriptData.first()
|
scriptData.first()
|
||||||
} else {
|
} else {
|
||||||
scriptData.find { it.second?.filterMedia(title, year, lastSeason) == true }
|
scriptData.find { it.second?.filterMedia(title, year, lastSeason) == true }
|
||||||
|
})?.first
|
||||||
}
|
}
|
||||||
|
|
||||||
val detailDoc = app.get(script?.first ?: return).document
|
val detailDoc = app.get(url ?: return).document
|
||||||
|
|
||||||
val iframeList = detailDoc.select("div.entry-content p").map { it }
|
val iframeList = detailDoc.select("div.entry-content p").map { it }
|
||||||
.filter { it.text().filterIframe(season, lastSeason, year) }.mapNotNull {
|
.filter { it.text().filterIframe(season, lastSeason, year) }.mapNotNull {
|
||||||
|
|
Loading…
Reference in a new issue