Skip to content

Commit

Permalink
fix(tr/anizm): Fix cloudflare issues (#2521)
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudemirovsky authored Nov 18, 2023
1 parent 51f7fbe commit 6f3b46c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/tr/anizm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ext {
extName = 'Anizm'
pkgNameSuffix = 'tr.anizm'
extClass = '.Anizm'
extVersionCode = 10
extVersionCode = 11
libVersion = '13'
}

Expand All @@ -18,7 +18,6 @@ dependencies {
implementation(project(":lib-filemoon-extractor"))
implementation(project(":lib-gdriveplayer-extractor"))
implementation(project(":lib-mp4upload-extractor"))
implementation(project(":lib-mytv-extractor"))
implementation(project(":lib-okru-extractor"))
implementation(project(":lib-sendvid-extractor"))
implementation(project(":lib-sibnet-extractor"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import eu.kanade.tachiyomi.lib.doodextractor.DoodExtractor
import eu.kanade.tachiyomi.lib.filemoonextractor.FilemoonExtractor
import eu.kanade.tachiyomi.lib.gdriveplayerextractor.GdrivePlayerExtractor
import eu.kanade.tachiyomi.lib.mp4uploadextractor.Mp4uploadExtractor
import eu.kanade.tachiyomi.lib.mytvextractor.MytvExtractor
import eu.kanade.tachiyomi.lib.okruextractor.OkruExtractor
import eu.kanade.tachiyomi.lib.sendvidextractor.SendvidExtractor
import eu.kanade.tachiyomi.lib.sibnetextractor.SibnetExtractor
Expand Down Expand Up @@ -58,6 +57,8 @@ class Anizm : ParsedAnimeHttpSource(), ConfigurableAnimeSource {

override val supportsLatest = true

override val client = network.cloudflareClient

override fun headersBuilder() = super.headersBuilder()
.add("Origin", baseUrl)
.add("Referer", "$baseUrl/")
Expand Down Expand Up @@ -245,7 +246,6 @@ class Anizm : ParsedAnimeHttpSource(), ConfigurableAnimeSource {
private val filemoonExtractor by lazy { FilemoonExtractor(client) }
private val gdrivePlayerExtractor by lazy { GdrivePlayerExtractor(client) }
private val mp4uploadExtractor by lazy { Mp4uploadExtractor(client) }
private val mytvExtractor by lazy { MytvExtractor(client) }
private val okruExtractor by lazy { OkruExtractor(client) }
private val sendvidExtractor by lazy { SendvidExtractor(client, headers) }
private val sibnetExtractor by lazy { SibnetExtractor(client) }
Expand All @@ -264,7 +264,6 @@ class Anizm : ParsedAnimeHttpSource(), ConfigurableAnimeSource {
"sendvid.com" in url -> sendvidExtractor.videosFromUrl(url)
"video.sibnet" in url -> sibnetExtractor.videosFromUrl(url)
"mp4upload" in url -> mp4uploadExtractor.videosFromUrl(url, headers)
"myvi." in url -> mytvExtractor.videosFromUrl(url)
"ok.ru" in url || "odnoklassniki.ru" in url -> okruExtractor.videosFromUrl(url)
"yourupload" in url -> yourUploadExtractor.videoFromUrl(url, headers)
"streamtape" in url -> streamtapeExtractor.videoFromUrl(url)?.let(::listOf)
Expand Down Expand Up @@ -460,8 +459,6 @@ class Anizm : ParsedAnimeHttpSource(), ConfigurableAnimeSource {
"FileMoon",
"GDrive",
"MP4Upload",
"MyviRU",
"Myvi.TV",
"Odnoklassniki",
"SendVid",
"Sibnet",
Expand Down

0 comments on commit 6f3b46c

Please sign in to comment.