Skip to content

Commit

Permalink
feat(ar/mycima): Refactor + add more servers (#3309)
Browse files Browse the repository at this point in the history
  • Loading branch information
adly98 authored Jun 9, 2024
1 parent 1ba2bfe commit 1a04f39
Show file tree
Hide file tree
Showing 4 changed files with 225 additions and 254 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package eu.kanade.tachiyomi.lib.vidbomextractor
import eu.kanade.tachiyomi.animesource.model.Video
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.Headers
import okhttp3.OkHttpClient

class VidBomExtractor(private val client: OkHttpClient) {
fun videosFromUrl(url: String): List<Video> {
val doc = client.newCall(GET(url)).execute().asJsoup()
fun videosFromUrl(url: String, headers: Headers? = null): List<Video> {
val request = if (headers != null) GET(url, headers) else GET(url)
val doc = client.newCall(request).execute().asJsoup()
val script = doc.selectFirst("script:containsData(sources)")!!
val data = script.data().substringAfter("sources: [").substringBefore("],")

Expand Down
7 changes: 5 additions & 2 deletions src/ar/mycima/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
ext {
extName = 'MY CIMA'
extClass = '.MyCima'
extVersionCode = 20
extVersionCode = 21
}

apply from: "$rootDir/common.gradle"

dependencies {
implementation(project(':lib:uqload-extractor'))
}
implementation(project(':lib:vidbom-extractor'))
implementation(project(':lib:dood-extractor'))
implementation(project(':lib:okru-extractor'))
}
Loading

0 comments on commit 1a04f39

Please sign in to comment.