fix(en/gogoanime): Fix info for recent anime & gogoextractor names (#2022)

This commit is contained in:
Secozzi
2023-08-06 19:39:07 +02:00
committed by GitHub
parent c7902b38ae
commit 0afcf2dea8
3 changed files with 12 additions and 9 deletions

View File

@ -7,7 +7,7 @@ ext {
extName = 'Gogoanime' extName = 'Gogoanime'
pkgNameSuffix = 'en.gogoanime' pkgNameSuffix = 'en.gogoanime'
extClass = '.GogoAnime' extClass = '.GogoAnime'
extVersionCode = 69 extVersionCode = 70
libVersion = '13' libVersion = '13'
} }

View File

@ -111,15 +111,19 @@ class GogoAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
// =========================== Anime Details ============================ // =========================== Anime Details ============================
override fun animeDetailsParse(document: Document): SAnime { override fun animeDetailsParse(document: Document): SAnime {
val infoDocument = document.selectFirst("div.anime-info a[href]")?.let {
client.newCall(GET(it.attr("abs:href"), headers)).execute().asJsoup()
} ?: document
return SAnime.create().apply { return SAnime.create().apply {
title = document.select("div.anime_info_body_bg h1").text() title = infoDocument.select("div.anime_info_body_bg h1").text()
genre = document.select("p.type:eq(5) a").joinToString("") { it.text() } genre = infoDocument.select("p.type:eq(5) a").joinToString("") { it.text() }
description = document.selectFirst("p.type:eq(4)")!!.ownText() description = infoDocument.selectFirst("p.type:eq(4)")!!.ownText()
status = parseStatus(document.select("p.type:eq(7) a").text()) status = parseStatus(infoDocument.select("p.type:eq(7) a").text())
// add alternative name to anime description // add alternative name to anime description
val altName = "Other name(s): " val altName = "Other name(s): "
document.selectFirst("p.type:eq(8)")?.ownText()?.let { infoDocument.selectFirst("p.type:eq(8)")?.ownText()?.let {
if (it.isBlank().not()) { if (it.isBlank().not()) {
description = when { description = when {
description.isNullOrBlank() -> altName + it description.isNullOrBlank() -> altName + it
@ -183,8 +187,7 @@ class GogoAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
private fun getHosterVideos(className: String, serverUrl: String): List<Video> { private fun getHosterVideos(className: String, serverUrl: String): List<Video> {
return when (className) { return when (className) {
"anime" -> gogoExtractor.videosFromUrl(serverUrl) "anime", "vidcdn" -> gogoExtractor.videosFromUrl(serverUrl)
"vidcdn" -> gogoExtractor.videosFromUrl(serverUrl)
"streamwish" -> streamwishExtractor.videosFromUrl(serverUrl) "streamwish" -> streamwishExtractor.videosFromUrl(serverUrl)
"doodstream" -> doodExtractor.videosFromUrl(serverUrl) "doodstream" -> doodExtractor.videosFromUrl(serverUrl)
"mp4upload" -> mp4uploadExtractor.videosFromUrl(serverUrl, headers) "mp4upload" -> mp4uploadExtractor.videosFromUrl(serverUrl, headers)

View File

@ -46,7 +46,7 @@ class GogoCdnExtractor(private val client: OkHttpClient, private val json: Json)
val id = httpUrl.queryParameter("id") ?: throw Exception("error getting id") val id = httpUrl.queryParameter("id") ?: throw Exception("error getting id")
val encryptedId = cryptoHandler(id, iv, secretKey) val encryptedId = cryptoHandler(id, iv, secretKey)
val token = httpUrl.queryParameter("token") val token = httpUrl.queryParameter("token")
val qualityPrefix = if (token != null) "Gogostream: " else "Vidstreaming: " val qualityPrefix = if (token != null) "Gogostream - " else "Vidstreaming - "
val jsonResponse = client.newCall( val jsonResponse = client.newCall(
GET( GET(