Ngefilm, Samehadaku: updated domain

This commit is contained in:
sora 2023-08-22 00:23:43 +07:00
parent 52f50292c9
commit b2227f51fe
5 changed files with 18 additions and 8 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 6 version = 7
cloudstream { cloudstream {

View file

@ -7,9 +7,11 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.httpsify import com.lagradost.cloudstream3.utils.httpsify
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
import java.net.URI
open class Gomov : MainAPI() { open class Gomov : MainAPI() {
override var mainUrl = "https://gomov.bio" override var mainUrl = "https://gomov.bio"
private var directUrl: String? = null
override var name = "Gomov" override var name = "Gomov"
override val hasMainPage = true override val hasMainPage = true
override var lang = "id" override var lang = "id"
@ -78,7 +80,9 @@ open class Gomov : MainAPI() {
} }
override suspend fun load(url: String): LoadResponse { override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document val fetch = app.get(url)
directUrl = getBaseUrl(fetch.url)
val document = fetch.document
val title = val title =
document.selectFirst("h1.entry-title")?.text()?.substringBefore("Season")?.substringBefore("Episode")?.trim() document.selectFirst("h1.entry-title")?.text()?.substringBefore("Season")?.substringBefore("Episode")?.trim()
@ -151,11 +155,11 @@ open class Gomov : MainAPI() {
document.select("div.tab-content-ajax").apmap { document.select("div.tab-content-ajax").apmap {
val server = app.post( val server = app.post(
"$mainUrl/wp-admin/admin-ajax.php", "$directUrl/wp-admin/admin-ajax.php",
data = mapOf("action" to "muvipro_player_content", "tab" to it.attr("id"), "post_id" to id) data = mapOf("action" to "muvipro_player_content", "tab" to it.attr("id"), "post_id" to id)
).document.select("iframe").attr("src") ).document.select("iframe").attr("src")
loadExtractor(httpsify(server), "$mainUrl/", subtitleCallback, callback) loadExtractor(httpsify(server), "$directUrl/", subtitleCallback, callback)
} }
return true return true
@ -169,4 +173,10 @@ open class Gomov : MainAPI() {
return this.replace(regex?.get(0) ?: return null, "") return this.replace(regex?.get(0) ?: return null, "")
} }
private fun getBaseUrl(url: String): String {
return URI(url).let {
"${it.scheme}://${it.host}"
}
}
} }

View file

@ -9,7 +9,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
class Ngefilm : DutaMovie() { class Ngefilm : DutaMovie() {
override var mainUrl = "https://ngefilm21.lol" override var mainUrl = "https://ngefilm21.lat"
override var name = "Ngefilm" override var name = "Ngefilm"
override val mainPage = mainPageOf( override val mainPage = mainPageOf(

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 12 version = 13
cloudstream { cloudstream {
@ -23,5 +23,5 @@ cloudstream {
"Anime", "Anime",
) )
iconUrl = "https://www.google.com/s2/favicons?domain=194.163.183.129&sz=%size%" iconUrl = "https://www.google.com/s2/favicons?domain=samehadaku.world&sz=%size%"
} }

View file

@ -8,7 +8,7 @@ import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
class Samehadaku : MainAPI() { class Samehadaku : MainAPI() {
override var mainUrl = "https://samehadaku.lat" override var mainUrl = "https://samehadaku.world"
override var name = "Samehadaku" override var name = "Samehadaku"
override val hasMainPage = true override val hasMainPage = true
override var lang = "id" override var lang = "id"