Update Moshahda.kt

This commit is contained in:
Lazycoder 2022-10-19 21:59:24 +02:00 committed by GitHub
parent 77ab2e8571
commit de17edced3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,8 +17,7 @@ class Moshahda : ExtractorApi() {
val sources = mutableListOf<ExtractorLink>() val sources = mutableListOf<ExtractorLink>()
val regex = """\/embed-([0-9A-Za-z]*)""".toRegex() val regex = """\/embed-([0-9A-Za-z]*)""".toRegex()
val scode = regex.find(url)?.groupValues?.getOrNull(1) val scode = regex.find(url)?.groupValues?.getOrNull(1)
val slink = """https://moshahda.net/embed-$scode.html?""" val slink = """$mainUrl/embed-$scode.html?"""
with(app.get(slink).document) { with(app.get(slink).document) {
val data = this.select("body > script").mapNotNull { script -> val data = this.select("body > script").mapNotNull { script ->
if (script.data().contains("sources: [")) { if (script.data().contains("sources: [")) {
@ -40,7 +39,6 @@ class Moshahda : ExtractorApi() {
) )
) )
} }
} }
return sources return sources
} }