From c10db5161c3cbb5c6b6dd4f7a753f592905fc291 Mon Sep 17 00:00:00 2001 From: Jacob Rein Date: Wed, 29 Nov 2023 11:57:05 -0500 Subject: [PATCH] Small cleanup --- .../programmersbox/anime_sources/Sources.kt | 5 +- .../anime_sources/anime/GogoAnimeVC.kt | 48 ++++--------------- 2 files changed, 10 insertions(+), 43 deletions(-) diff --git a/anime_sources/src/main/java/com/programmersbox/anime_sources/Sources.kt b/anime_sources/src/main/java/com/programmersbox/anime_sources/Sources.kt index 549ff004f..4304c8916 100644 --- a/anime_sources/src/main/java/com/programmersbox/anime_sources/Sources.kt +++ b/anime_sources/src/main/java/com/programmersbox/anime_sources/Sources.kt @@ -7,7 +7,6 @@ import com.programmersbox.anime_sources.anime.AnimeKisaMovies import com.programmersbox.anime_sources.anime.AnimeKisaSubbed import com.programmersbox.anime_sources.anime.CrunchyRoll import com.programmersbox.anime_sources.anime.Dopebox -import com.programmersbox.anime_sources.anime.GogoAnimeVC import com.programmersbox.anime_sources.anime.Hdm import com.programmersbox.anime_sources.anime.PutlockerAnime import com.programmersbox.anime_sources.anime.PutlockerCartoons @@ -27,7 +26,7 @@ enum class Sources(private val api: ApiService, override val notWorking: Boolean ALLANIME(AllAnime), - GOGOANIME_VC(GogoAnimeVC), + //GOGOANIME_VC(GogoAnimeVC), HDM(Hdm, true), //ANIMESIMPLE_SUBBED(AnimeSimpleSubbed), ANIMESIMPLE_DUBBED(AnimeSimpleDubbed), @@ -63,7 +62,7 @@ enum class Sources(private val api: ApiService, override val notWorking: Boolean DOPEBOX, SFLIX, WCOSTREAM, - GOGOANIME_VC, + //GOGOANIME_VC, ANIMEFLICK, ANIMEKISA_SUBBED, //HDM, diff --git a/anime_sources/src/main/java/com/programmersbox/anime_sources/anime/GogoAnimeVC.kt b/anime_sources/src/main/java/com/programmersbox/anime_sources/anime/GogoAnimeVC.kt index 1872329c4..04ef0e25c 100644 --- a/anime_sources/src/main/java/com/programmersbox/anime_sources/anime/GogoAnimeVC.kt +++ b/anime_sources/src/main/java/com/programmersbox/anime_sources/anime/GogoAnimeVC.kt @@ -1,20 +1,7 @@ package com.programmersbox.anime_sources.anime -import androidx.compose.ui.util.fastForEach -import androidx.compose.ui.util.fastMap -import com.programmersbox.anime_sources.ShowApi -import com.programmersbox.anime_sources.Sources -import com.programmersbox.anime_sources.toJsoup -import com.programmersbox.anime_sources.utilities.JsUnpacker -import com.programmersbox.anime_sources.utilities.extractors -import com.programmersbox.anime_sources.utilities.fixUrl -import com.programmersbox.anime_sources.utilities.getQualityFromName -import com.programmersbox.models.ChapterModel -import com.programmersbox.models.InfoModel -import com.programmersbox.models.ItemModel -import com.programmersbox.models.Storage -import org.jsoup.Jsoup +/* object GogoAnimeVC : ShowApi( baseUrl = "https://gogoanime.sk", recentPath = "", @@ -22,11 +9,13 @@ object GogoAnimeVC : ShowApi( ) { override val serviceName: String get() = "GOGOANIME_VC" - +*/ +/** private val headers = mapOf( "authority" to "ajax.gogo-load.com", "sec-ch-ua" to "\"Google Chrome\";v=\"89\", \"Chromium\";v=\"89\", \";Not A Brand\";v=\"99\"", - "accept" to "text/html, */*; q=0.01", + "accept" to "text/html, */ +/**; q=0.01", "dnt" to "1", "sec-ch-ua-mobile" to "?0", "user-agent" to "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36", @@ -36,7 +25,8 @@ object GogoAnimeVC : ShowApi( "sec-fetch-dest" to "empty", "referer" to "$baseUrl/" ) - + **/ +/* private val parseRegex = Regex("""
  • \s*\n.*\n.*\n.*?img src="(.*?)"""") override suspend fun recent(page: Int): List { @@ -200,29 +190,7 @@ object GogoAnimeVC : ShowApi( //println(url + "\t" + e.name) e.getUrl(url) } else emptyList() - /*listOf( - Storage( - link = it.attr("href"), - source = link, - filename = "${chapterModel.name}.mp4", - quality = it.text(), - sub = it.text() - ) - )*/ } - //.distinctBy { it.link } - /*if(url.startsWith(XStreamCdn.mainUrl)) - XStreamCdn.getUrl(url) - else - listOf( - Storage( - link = it.attr("href"), - source = link, - filename = "${chapterModel.name}.mp4", - quality = it.text(), - sub = it.text() - ) - )*/ } } .flatten() @@ -235,5 +203,5 @@ object GogoAnimeVC : ShowApi( private fun getAndUnpack(string: String): String? = JsUnpacker(getPacked(string)).unpack() private val qualityRegex = Regex("(\\d+)P") -} +}*/