mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
kekw
This commit is contained in:
parent
d50cb91e5c
commit
0d583bf278
1 changed files with 1 additions and 5 deletions
|
@ -68,10 +68,6 @@ class NineGoal : MainAPI() {
|
||||||
TvType.Live
|
TvType.Live
|
||||||
)
|
)
|
||||||
|
|
||||||
private fun String.getDomainFromUrl(): String? {
|
|
||||||
return Regex("""^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n\?\=]+)""").find(this)?.groupValues?.firstOrNull()
|
|
||||||
}
|
|
||||||
|
|
||||||
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
|
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
|
||||||
val doc = app.get(mainUrl).document
|
val doc = app.get(mainUrl).document
|
||||||
val apiUrl = doc.select("head > script").first()?.html()?.substringAfter("window.api_base_url = \"")?.substringBefore("\";")
|
val apiUrl = doc.select("head > script").first()?.html()?.substringAfter("window.api_base_url = \"")?.substringBefore("\";")
|
||||||
|
@ -124,7 +120,7 @@ class NineGoal : MainAPI() {
|
||||||
this.name,
|
this.name,
|
||||||
"${this.name} ${it.name} - ${sourcesData.name}",
|
"${this.name} ${it.name} - ${sourcesData.name}",
|
||||||
it.url.toString(),
|
it.url.toString(),
|
||||||
fixUrl(it.url?.getDomainFromUrl().toString()),
|
"$mainUrl/",
|
||||||
Qualities.Unknown.value,
|
Qualities.Unknown.value,
|
||||||
isM3u8 = true,
|
isM3u8 = true,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue