From b2523ab859108111a2ab1192d4d6f32d5e4eabf9 Mon Sep 17 00:00:00 2001 From: Secozzi <49240133+Secozzi@users.noreply.github.com> Date: Thu, 21 Mar 2024 07:39:27 +0000 Subject: [PATCH] fix(src/all): Fix google drive based extensions (#3062) Signed-off-by: Secozzi --- .../GoogleDriveExtractor.kt | 122 ++---------------- .../all/googledrive/GoogleDrive.kt | 2 +- .../animeextension/en/kayoanime/Kayoanime.kt | 39 ++++-- .../en/ripcrabbyanime/Ripcrabbyanime.kt | 4 +- 4 files changed, 43 insertions(+), 124 deletions(-) diff --git a/lib/googledrive-extractor/src/main/java/eu/kanade/tachiyomi/lib/googledriveextractor/GoogleDriveExtractor.kt b/lib/googledrive-extractor/src/main/java/eu/kanade/tachiyomi/lib/googledriveextractor/GoogleDriveExtractor.kt index ceaa6822b9..4da995371d 100644 --- a/lib/googledrive-extractor/src/main/java/eu/kanade/tachiyomi/lib/googledriveextractor/GoogleDriveExtractor.kt +++ b/lib/googledrive-extractor/src/main/java/eu/kanade/tachiyomi/lib/googledriveextractor/GoogleDriveExtractor.kt @@ -2,15 +2,11 @@ package eu.kanade.tachiyomi.lib.googledriveextractor import eu.kanade.tachiyomi.animesource.model.Video import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.util.asJsoup import okhttp3.Cookie -import okhttp3.CookieJar import okhttp3.Headers -import okhttp3.HttpUrl import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.OkHttpClient -import okhttp3.internal.commonEmptyRequestBody class GoogleDriveExtractor(private val client: OkHttpClient, private val headers: Headers) { @@ -20,28 +16,21 @@ class GoogleDriveExtractor(private val client: OkHttpClient, private val headers private val cookieList = client.cookieJar.loadForRequest("https://drive.google.com".toHttpUrl()) - private val noRedirectClient = OkHttpClient.Builder() - .followRedirects(false) - .build() - - fun videosFromUrl(itemUrl: String, videoName: String = "Video"): List