fix Anime-Base & fix VoeExtractor (#995)

* fix VoeExtractor

* fix Anime-Base
This commit is contained in:
LuftVerbot
2022-11-03 14:10:19 +01:00
committed by GitHub
parent a5d70d8fc1
commit 43e111ba7f
4 changed files with 11 additions and 11 deletions

View File

@ -12,8 +12,8 @@ class VoeExtractor(private val client: OkHttpClient) {
val script = document.selectFirst("script:containsData(const sources)")
?.data()
?: return null
val videoUrl = script.substringAfter("hls\": \"").substringBefore("\"")
val resolution = script.substringAfter("video_height\": ")
val videoUrl = script.substringAfter("hls': '").substringBefore("'")
val resolution = script.substringAfter("video_height': ")
.substringBefore(",")
val qualityStr = quality ?: "VoeCDN(${resolution}p)"
return Video(url, qualityStr, videoUrl)