From 88e9f04011df14e8d6fd7b38e16a7447d0e9e5e2 Mon Sep 17 00:00:00 2001 From: LuftVerbot <97435834+LuftVerbot@users.noreply.github.com> Date: Wed, 17 May 2023 19:42:13 +0200 Subject: [PATCH] Anime-Loads: fix (#1616) --- src/de/animeloads/build.gradle | 2 +- .../de/animeloads/AnimeLoads.kt | 456 ++++++++++++------ 2 files changed, 309 insertions(+), 149 deletions(-) diff --git a/src/de/animeloads/build.gradle b/src/de/animeloads/build.gradle index f7134098d..de914f227 100644 --- a/src/de/animeloads/build.gradle +++ b/src/de/animeloads/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Anime-Loads' pkgNameSuffix = 'de.animeloads' extClass = '.AnimeLoads' - extVersionCode = 6 + extVersionCode = 7 libVersion = '13' } diff --git a/src/de/animeloads/src/eu/kanade/tachiyomi/animeextension/de/animeloads/AnimeLoads.kt b/src/de/animeloads/src/eu/kanade/tachiyomi/animeextension/de/animeloads/AnimeLoads.kt index 9b5558503..8f4b79c6a 100644 --- a/src/de/animeloads/src/eu/kanade/tachiyomi/animeextension/de/animeloads/AnimeLoads.kt +++ b/src/de/animeloads/src/eu/kanade/tachiyomi/animeextension/de/animeloads/AnimeLoads.kt @@ -228,49 +228,89 @@ class AnimeLoads : ConfigurableAnimeSource, ParsedAnimeHttpSource() { val hoster = it.substringAfter("\"hoster\":\"").substringBefore("\",\"") val linkpart = it.substringAfter("\"link\":\"").substringBefore("\"}]") val leaveurl = client.newCall(GET("$baseUrl/leave/$linkpart")).execute().request.url.toString() - val neexurl = client.newCall(GET(leaveurl)).execute().request.url.toString() - val neexdoc = client.newCall(GET(leaveurl)).execute().asJsoup() - val nextlink = neexdoc.select("div#continue a").attr("href") - val anipart = nextlink.substringAfter("$baseUrl/leave/") - Thread.sleep(10000) - client.newCall(GET(nextlink, headers = Headers.headersOf("referer", neexurl))).execute().asJsoup() - when { - hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Voe Deutsch Sub" - val video = try { - VoeExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null + if (leaveurl.contains(baseUrl)) { + val neexurl = client.newCall(GET(leaveurl)).execute().request.url.toString() + val neexdoc = client.newCall(GET(leaveurl)).execute().asJsoup() + val nextlink = neexdoc.select("div#continue a").attr("href") + val anipart = nextlink.substringAfter("$baseUrl/leave/") + Thread.sleep(10000) + client.newCall(GET(nextlink, headers = Headers.headersOf("referer", neexurl))).execute().asJsoup() + when { + hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Voe Deutsch Sub" + val video = try { + VoeExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } - if (video != null) { - videoList.add(video) + + hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Streamtape Deutsch Sub" + val video = try { + StreamTapeExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } + } + + hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Doodstreams Deutsch Sub" + val video = try { + DoodExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } } + } else { + when { + hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { + val quality = "Voe Deutsch Sub" + val video = try { + VoeExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } + } - hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Streamtape Deutsch Sub" - val video = try { - StreamTapeExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null + hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { + val quality = "Streamtape Deutsch Sub" + val video = try { + StreamTapeExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } - if (video != null) { - videoList.add(video) - } - } - hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Doodstreams Deutsch Sub" - val video = try { - DoodExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null - } - if (video != null) { - videoList.add(video) + hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { + val quality = "Doodstreams Deutsch Sub" + val video = try { + DoodExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } } } @@ -324,49 +364,89 @@ class AnimeLoads : ConfigurableAnimeSource, ParsedAnimeHttpSource() { val hoster = it.substringAfter("\"hoster\":\"").substringBefore("\",\"") val linkpart = it.substringAfter("\"link\":\"").substringBefore("\"}]") val leaveurl = client.newCall(GET("$baseUrl/leave/$linkpart")).execute().request.url.toString() - val neexurl = client.newCall(GET(leaveurl)).execute().request.url.toString() - val neexdoc = client.newCall(GET(leaveurl)).execute().asJsoup() - val nextlink = neexdoc.select("div#continue a").attr("href") - val anipart = nextlink.substringAfter("$baseUrl/leave/") - Thread.sleep(10000) - client.newCall(GET(nextlink, headers = Headers.headersOf("referer", neexurl))).execute().asJsoup() - when { - hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Voe Deutsch Sub" - val video = try { - VoeExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null + if (leaveurl.contains(baseUrl)) { + val neexurl = client.newCall(GET(leaveurl)).execute().request.url.toString() + val neexdoc = client.newCall(GET(leaveurl)).execute().asJsoup() + val nextlink = neexdoc.select("div#continue a").attr("href") + val anipart = nextlink.substringAfter("$baseUrl/leave/") + Thread.sleep(10000) + client.newCall(GET(nextlink, headers = Headers.headersOf("referer", neexurl))).execute().asJsoup() + when { + hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Voe Deutsch Sub" + val video = try { + VoeExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } - if (video != null) { - videoList.add(video) + + hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Streamtape Deutsch Sub" + val video = try { + StreamTapeExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } + } + + hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Doodstreams Deutsch Sub" + val video = try { + DoodExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } } + } else { + when { + hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { + val quality = "Voe Deutsch Sub" + val video = try { + VoeExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } + } - hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Streamtape Deutsch Sub" - val video = try { - StreamTapeExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null + hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { + val quality = "Streamtape Deutsch Sub" + val video = try { + StreamTapeExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } - if (video != null) { - videoList.add(video) - } - } - hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Doodstream Deutsch Sub" - val video = try { - DoodExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null - } - if (video != null) { - videoList.add(video) + hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { + val quality = "Doodstreams Deutsch Sub" + val video = try { + DoodExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } } } @@ -482,49 +562,89 @@ class AnimeLoads : ConfigurableAnimeSource, ParsedAnimeHttpSource() { val hoster = it.substringAfter("\"hoster\":\"").substringBefore("\",\"") val linkpart = it.substringAfter("\"link\":\"").substringBefore("\"}]") val leaveurl = client.newCall(GET("$baseUrl/leave/$linkpart")).execute().request.url.toString() - val neexurl = client.newCall(GET(leaveurl)).execute().request.url.toString() - val neexdoc = client.newCall(GET(leaveurl)).execute().asJsoup() - val nextlink = neexdoc.select("div#continue a").attr("href") - val anipart = nextlink.substringAfter("$baseUrl/leave/") - Thread.sleep(10000) - client.newCall(GET(nextlink, headers = Headers.headersOf("referer", neexurl))).execute().asJsoup() - when { - hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Voe Deutsch Dub" - val video = try { - VoeExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null + if (leaveurl.contains(baseUrl)) { + val neexurl = client.newCall(GET(leaveurl)).execute().request.url.toString() + val neexdoc = client.newCall(GET(leaveurl)).execute().asJsoup() + val nextlink = neexdoc.select("div#continue a").attr("href") + val anipart = nextlink.substringAfter("$baseUrl/leave/") + Thread.sleep(10000) + client.newCall(GET(nextlink, headers = Headers.headersOf("referer", neexurl))).execute().asJsoup() + when { + hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Voe Deutsch Dub" + val video = try { + VoeExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } - if (video != null) { - videoList.add(video) + + hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Streamtape Deutsch Dub" + val video = try { + StreamTapeExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } + } + + hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Doodstream Deutsch Dub" + val video = try { + DoodExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } } + } else { + when { + hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { + val quality = "Voe Deutsch Dub" + val video = try { + VoeExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } + } - hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Streamtape Deutsch Dub" - val video = try { - StreamTapeExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null + hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { + val quality = "Streamtape Deutsch Dub" + val video = try { + StreamTapeExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } - if (video != null) { - videoList.add(video) - } - } - hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Doodstream Deutsch Dub" - val video = try { - DoodExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null - } - if (video != null) { - videoList.add(video) + hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { + val quality = "Doodstream Deutsch Dub" + val video = try { + DoodExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } } } @@ -578,49 +698,89 @@ class AnimeLoads : ConfigurableAnimeSource, ParsedAnimeHttpSource() { val hoster = it.substringAfter("\"hoster\":\"").substringBefore("\",\"") val linkpart = it.substringAfter("\"link\":\"").substringBefore("\"}]") val leaveurl = client.newCall(GET("$baseUrl/leave/$linkpart")).execute().request.url.toString() - val neexurl = client.newCall(GET(leaveurl)).execute().request.url.toString() - val neexdoc = client.newCall(GET(leaveurl)).execute().asJsoup() - val nextlink = neexdoc.select("div#continue a").attr("href") - val anipart = nextlink.substringAfter("$baseUrl/leave/") - Thread.sleep(10000) - client.newCall(GET(nextlink, headers = Headers.headersOf("referer", neexurl))).execute().asJsoup() - when { - hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Voe Deutsch Dub" - val video = try { - VoeExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null + if (leaveurl.contains(baseUrl)) { + val neexurl = client.newCall(GET(leaveurl)).execute().request.url.toString() + val neexdoc = client.newCall(GET(leaveurl)).execute().asJsoup() + val nextlink = neexdoc.select("div#continue a").attr("href") + val anipart = nextlink.substringAfter("$baseUrl/leave/") + Thread.sleep(10000) + client.newCall(GET(nextlink, headers = Headers.headersOf("referer", neexurl))).execute().asJsoup() + when { + hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Voe Deutsch Dub" + val video = try { + VoeExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } - if (video != null) { - videoList.add(video) + + hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Streamtape Deutsch Dub" + val video = try { + StreamTapeExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } + } + + hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { + val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() + val quality = "Doodstream Deutsch Dub" + val video = try { + DoodExtractor(client).videoFromUrl(link, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } } + } else { + when { + hoster.contains("voesx") && hosterSelection?.contains("voe") == true -> { + val quality = "Voe Deutsch Dub" + val video = try { + VoeExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } + } - hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Streamtape Deutsch Dub" - val video = try { - StreamTapeExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null + hoster.contains("streamtapecom") && hosterSelection?.contains("stape") == true -> { + val quality = "Streamtape Deutsch Dub" + val video = try { + StreamTapeExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } - if (video != null) { - videoList.add(video) - } - } - hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { - val link = client.newCall(GET("$baseUrl/leave/$anipart")).execute().request.url.toString() - val quality = "Doodstream Deutsch Dub" - val video = try { - DoodExtractor(client).videoFromUrl(link, quality) - } catch (e: Exception) { - null - } - if (video != null) { - videoList.add(video) + hoster.contains("doodstream") && hosterSelection?.contains("dood") == true -> { + val quality = "Doodstream Deutsch Dub" + val video = try { + DoodExtractor(client).videoFromUrl(leaveurl, quality) + } catch (e: Exception) { + null + } + if (video != null) { + videoList.add(video) + } } } }