mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Update Dailymotion.kt
This commit is contained in:
parent
92031173bd
commit
065fd95eae
1 changed files with 12 additions and 9 deletions
|
@ -13,6 +13,7 @@ open class Dailymotion : ExtractorApi() {
|
||||||
override val mainUrl = "https://www.dailymotion.com"
|
override val mainUrl = "https://www.dailymotion.com"
|
||||||
override val name = "Dailymotion"
|
override val name = "Dailymotion"
|
||||||
override val requiresReferer = false
|
override val requiresReferer = false
|
||||||
|
|
||||||
@Suppress("RegExpSimplifiable")
|
@Suppress("RegExpSimplifiable")
|
||||||
private val videoIdRegex = "^[kx][a-zA-Z0-9]+\$".toRegex()
|
private val videoIdRegex = "^[kx][a-zA-Z0-9]+\$".toRegex()
|
||||||
|
|
||||||
|
@ -42,7 +43,8 @@ open class Dailymotion : ExtractorApi() {
|
||||||
val metaData = app.get(metaDataUrl, referer = embedUrl, cookies = cookies)
|
val metaData = app.get(metaDataUrl, referer = embedUrl, cookies = cookies)
|
||||||
.parsedSafe<MetaData>() ?: return
|
.parsedSafe<MetaData>() ?: return
|
||||||
metaData.qualities.forEach { (key, video) ->
|
metaData.qualities.forEach { (key, video) ->
|
||||||
video.map {
|
video.forEach {
|
||||||
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
name,
|
name,
|
||||||
"$name $key",
|
"$name $key",
|
||||||
|
@ -51,7 +53,8 @@ open class Dailymotion : ExtractorApi() {
|
||||||
Qualities.Unknown.value,
|
Qualities.Unknown.value,
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
}.forEach(callback)
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue