fix(tr/animeler): Fix video extractor (#2443)

This commit is contained in:
Claudemirovsky
2023-10-30 09:51:36 -03:00
committed by GitHub
parent 1770355c7a
commit 5df1922e37
2 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,7 @@ ext {
extName = 'Animeler'
pkgNameSuffix = 'tr.animeler'
extClass = '.Animeler'
extVersionCode = 3
extVersionCode = 4
libVersion = '13'
}

View File

@ -227,6 +227,10 @@ class Animeler : AnimeHttpSource(), ConfigurableAnimeSource {
val doc = response.use { it.asJsoup() }
val iframeUrl = doc.selectFirst("div.episode-player-box > iframe")
?.attr("src")
?: doc.selectFirst("script:containsData(embedUrl)")
?.data()
?.substringAfter("\"embedUrl\": \"")
?.substringBefore('"')
?: throw Exception("No video available.")
val playerBody = { it: String ->