mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
added server support for gogo
This commit is contained in:
parent
64c5a029ac
commit
9d19f4cde7
2 changed files with 32 additions and 13 deletions
7
.idea/discord.xml
Normal file
7
.idea/discord.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
|
@ -2,6 +2,7 @@ package com.lagradost.cloudstream3.animeproviders
|
|||
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.extractorApis
|
||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||
import org.jsoup.Jsoup
|
||||
import java.util.*
|
||||
|
@ -203,20 +204,31 @@ class GogoanimeProvider : MainAPI() {
|
|||
val page = khttp.get(link, headers = mapOf("Referer" to iframe))
|
||||
val pageDoc = Jsoup.parse(page.text)
|
||||
|
||||
return pageDoc.select(".dowload > a[download]").map {
|
||||
return pageDoc.select(".dowload > a").map {
|
||||
if (it.hasAttr("download")) {
|
||||
val qual = if (it.text()
|
||||
.contains("HDP")
|
||||
) "1080" else qualityRegex.find(it.text())?.destructured?.component1().toString()
|
||||
ExtractorLink(
|
||||
listOf(ExtractorLink(
|
||||
"Gogoanime",
|
||||
if(qual == "null") "Gogoanime" else "Gogoanime - " + qual + "p",
|
||||
it.attr("href"),
|
||||
page.url,
|
||||
getQualityFromName(qual),
|
||||
it.attr("href").contains(".m3u8")
|
||||
)
|
||||
))
|
||||
} else {
|
||||
val extractorLinks = ArrayList<ExtractorLink>()
|
||||
for (api in extractorApis) {
|
||||
if (api.name.equals(it.text().replace("Download", "").trim(), ignoreCase = true)) {
|
||||
extractorLinks.addAll(api.getSafeUrl(it.attr("href")) ?: listOf())
|
||||
break
|
||||
}
|
||||
}
|
||||
extractorLinks
|
||||
}
|
||||
}.flatten()
|
||||
}
|
||||
|
||||
override fun loadLinks(
|
||||
data: String,
|
||||
|
|
Loading…
Reference in a new issue