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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)

View File

@ -6,7 +6,7 @@ ext {
extName = 'Anime-Base'
pkgNameSuffix = 'de.animebase'
extClass = '.Anime-Base'
extVersionCode = 1
extVersionCode = 2
libVersion = '13'
}

View File

@ -67,13 +67,13 @@ class `Anime-Base` : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
val document = response.asJsoup()
val episodeList = mutableListOf<SEpisode>()
val episodeElement = document.select(
"div.tab-content table#angebotTabelle tbody tr.episodetoggleclass-gersub, div.tab-content table#angebotTabelle tbody tr.episodetoggleclass-Filme button[${
if (document.select("div.tab-content table#angebotTabelle tbody tr.episodetoggleclass-Filme button[data-dubbed=\"0\"]").isNullOrEmpty()){
"div.tab-content #gersub div.panel, div.tab-content #filme div.panel button[${
if (document.select("div.tab-content #filme div.panel button[data-dubbed=\"0\"]").isNullOrEmpty()){
"data-dubbed=\"1\""
} else {
"data-dubbed=\"0\""
}
}][data-hoster=\"1\"], div.tab-content table#angebotTabelle tbody tr.episodetoggleclass-Specials button[data-dubbed=\"0\"][data-hoster=\"1\"]"
}][data-hoster=\"1\"], div.tab-content #specials div.panel button[data-dubbed=\"0\"][data-hoster=\"1\"]"
)
episodeElement.forEach {
val episode = episodeFromElement(it)
@ -99,10 +99,10 @@ class `Anime-Base` : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
episode.name = "Film ${epnum.toInt() - 1}"
episode.setUrlWithoutDomain("/episode/$id/$epnum/0/$host/2")
} else {
val season = element.attr("class")
.substringAfter("-").substringBefore(" ger")
episode.name = "Staffel $season Folge $epnum : " + element.select("td.openEpisodeEmbed").toString()
.substringAfter("\">").substringBefore("<!")
val season = element.select("button[data-hoster=\"1\"]").attr("data-embedcontainer")
.substringAfter("-").substringBefore("-")
episode.name = "Staffel $season Folge $epnum : " + element.select("h3.panel-title").text()
.substringAfter(": ")
.replace("<span title=\"", "").replace("<span class=\"label label-danger\">Filler!</span>", "").replace("&nbsp;", "")
episode.episode_number = element.select("button[data-hoster=\"1\"]").attr("data-folge").toFloat()
episode.setUrlWithoutDomain("/episode/$id/$epnum/0/$host/0")

View File

@ -69,7 +69,7 @@ class CookieInterceptor(private val baseUrl: String) : Interceptor {
newRequest = GET(baseUrl, request.requestHeaders.toHeaders())
latch.countDown()
}
if (request.url.toString().contains("favicon.png") && request.url.toString().contains("anime-base")) {
if (request.url.toString().contains("favicon.ico") && request.url.toString().contains("anime-base")) {
newRequest = GET(baseUrl, request.requestHeaders.toHeaders())
latch.countDown()
}