fix [legionanime] (#1099)

This commit is contained in:
Diego Peña y Lillo
2022-12-21 04:54:16 -04:00
committed by GitHub
parent b375293d79
commit 837c7b741e
2 changed files with 43 additions and 37 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'LegionAnime'
pkgNameSuffix = 'es.legionanime'
extClass = '.LegionAnime'
extVersionCode = 5
extVersionCode = 6
libVersion = '13'
}

View File

@ -198,6 +198,7 @@ class LegionAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
} else {
it.jsonObject["name"]!!.jsonPrimitive.content.substringAfter("-").reversed()
}
try {
when {
url.contains("streamtape") -> {
val video = StreamTapeExtractor(client).videoFromUrl(url, server)
@ -209,7 +210,8 @@ class LegionAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
val newUrl = url.replace("fembed", "embedsito").replace("vanfem", "embedsito")
try {
videoList.addAll(FembedExtractor(client).videosFromUrl(newUrl, server))
} catch (_: Exception) {}
} catch (_: Exception) {
}
}
url.contains("sb") -> {
val video = StreamSBExtractor(client).videosFromUrl(url, headers)
@ -224,7 +226,8 @@ class LegionAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
if (video.isNotBlank()) {
videoList.add(Video(video, server, video))
}
} catch (_: Exception) {}
} catch (_: Exception) {
}
}
url.contains("yourupload") -> {
val headers = headers.newBuilder().add("referer", "https://www.yourupload.com/").build()
@ -237,6 +240,9 @@ class LegionAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
videoList.add(Video(videoUrl, server, videoUrl))
}
}
} catch (_: Exception) {
// ignore
}
}
return videoList
}