forked from AlmightyHak/extensions-source
fix(es/PelisplusHD): Change parallelCatchingFlatMapBlocking to flatMap (#131)
* chore(src/es): Change Domain on Hackstore and add VidHideExtractor * chore(src/ar): fix VideoListParse on Anime4up * fix(es/PelisplusHD): Change parallelCatchingFlatMapBlocking to flatMap
This commit is contained in:
parent
c9a53d6603
commit
6f70e420e6
2 changed files with 4 additions and 6 deletions
|
@ -23,7 +23,6 @@ import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor
|
|||
import eu.kanade.tachiyomi.lib.youruploadextractor.YourUploadExtractor
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import eu.kanade.tachiyomi.util.parallelCatchingFlatMapBlocking
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
|
@ -130,7 +129,7 @@ class Pelisplusph(override val name: String, override val baseUrl: String) : Pel
|
|||
|
||||
override fun videoListParse(response: Response): List<Video> {
|
||||
val document = response.asJsoup()
|
||||
return document.select("[class*=server-item-]").parallelCatchingFlatMapBlocking { serverItem ->
|
||||
return document.select("[class*=server-item-]").flatMap { serverItem ->
|
||||
val langIdx = getNumberFromString(serverItem.attr("class").substringAfter("server-item-"))
|
||||
val langItem = document.select("li[data-id=\"$langIdx\"] a").text()
|
||||
val lang = if (langItem.contains("Subtitulado")) "[SUB]" else if (langItem.contains("Latino")) "[LAT]" else "[CAST]"
|
||||
|
@ -166,7 +165,7 @@ class Pelisplusph(override val name: String, override val baseUrl: String) : Pel
|
|||
}
|
||||
embedUrl.contains("doodstream") || embedUrl.contains("dood.") || embedUrl.contains("ds2play") || embedUrl.contains("doods.") -> {
|
||||
val url2 = url.replace("https://doodstream.com/e/", "https://dood.to/e/")
|
||||
listOf(DoodExtractor(client).videoFromUrl(url2, "$prefix DoodStream", false)!!)
|
||||
listOf(DoodExtractor(client).videoFromUrl(url2, "$prefix DoodStream")!!)
|
||||
}
|
||||
embedUrl.contains("streamlare") -> StreamlareExtractor(client).videosFromUrl(url, prefix = prefix)
|
||||
embedUrl.contains("yourupload") || embedUrl.contains("upload") -> YourUploadExtractor(client).videoFromUrl(url, headers = headers, prefix = prefix)
|
||||
|
|
|
@ -24,7 +24,6 @@ import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor
|
|||
import eu.kanade.tachiyomi.lib.youruploadextractor.YourUploadExtractor
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import eu.kanade.tachiyomi.util.parallelCatchingFlatMapBlocking
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.JsonObject
|
||||
import kotlinx.serialization.json.jsonArray
|
||||
|
@ -135,7 +134,7 @@ class Pelisplusto(override val name: String, override val baseUrl: String) : Pel
|
|||
override fun videoListParse(response: Response): List<Video> {
|
||||
val document = response.asJsoup()
|
||||
val regIsUrl = "https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)".toRegex()
|
||||
return document.select(".bg-tabs ul li").parallelCatchingFlatMapBlocking {
|
||||
return document.select(".bg-tabs ul li").flatMap {
|
||||
val decode = String(Base64.decode(it.attr("data-server"), Base64.DEFAULT))
|
||||
|
||||
val url = if (!regIsUrl.containsMatchIn(decode)) {
|
||||
|
@ -207,7 +206,7 @@ class Pelisplusto(override val name: String, override val baseUrl: String) : Pel
|
|||
}
|
||||
embedUrl.contains("doodstream") || embedUrl.contains("dood.") || embedUrl.contains("ds2play") || embedUrl.contains("doods.") -> {
|
||||
val url2 = url.replace("https://doodstream.com/e/", "https://dood.to/e/")
|
||||
listOf(DoodExtractor(client).videoFromUrl(url2, "DoodStream", false)!!)
|
||||
listOf(DoodExtractor(client).videoFromUrl(url2, "DoodStream")!!)
|
||||
}
|
||||
embedUrl.contains("streamlare") -> StreamlareExtractor(client).videosFromUrl(url)
|
||||
embedUrl.contains("yourupload") || embedUrl.contains("upload") -> YourUploadExtractor(client).videoFromUrl(url, headers = headers)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue