[skip ci] refactor: Make extensions use the dailymotion-extractor lib (#2160)

This commit is contained in:
Claudemirovsky
2023-09-09 08:22:33 -03:00
committed by GitHub
parent 602e91e363
commit 4b0cf15499
28 changed files with 30 additions and 729 deletions

View File

@ -34,7 +34,7 @@ class DailymotionExtractor(private val client: OkHttpClient, private val headers
private val playlistUtils by lazy { PlaylistUtils(client, headers) }
fun videosFromUrl(url: String, prefix: String, baseUrl: String = "", password: String? = null): List<Video> {
fun videosFromUrl(url: String, prefix: String = "Dailymotion - ", baseUrl: String = "", password: String? = null): List<Video> {
val htmlString = client.newCall(GET(url)).execute().use { it.body.string() }
val internalData = htmlString.substringAfter("\"dmInternalData\":").substringBefore("</script>")