@ -6,7 +6,7 @@ ext {
|
|||||||
extName = 'FilmPalast'
|
extName = 'FilmPalast'
|
||||||
pkgNameSuffix = 'de.filmpalast'
|
pkgNameSuffix = 'de.filmpalast'
|
||||||
extClass = '.FilmPalast'
|
extClass = '.FilmPalast'
|
||||||
extVersionCode = 2
|
extVersionCode = 3
|
||||||
libVersion = '12'
|
libVersion = '12'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import android.content.SharedPreferences
|
|||||||
import androidx.preference.ListPreference
|
import androidx.preference.ListPreference
|
||||||
import androidx.preference.MultiSelectListPreference
|
import androidx.preference.MultiSelectListPreference
|
||||||
import androidx.preference.PreferenceScreen
|
import androidx.preference.PreferenceScreen
|
||||||
|
import eu.kanade.tachiyomi.animeextension.de.filmpalast.extractors.EvoloadExtractor
|
||||||
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
|
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
|
||||||
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
|
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
|
||||||
import eu.kanade.tachiyomi.animesource.model.SAnime
|
import eu.kanade.tachiyomi.animesource.model.SAnime
|
||||||
@ -81,7 +82,7 @@ class FilmPalast : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||||||
private fun videosFromElement(document: Document): List<Video> {
|
private fun videosFromElement(document: Document): List<Video> {
|
||||||
val videoList = mutableListOf<Video>()
|
val videoList = mutableListOf<Video>()
|
||||||
val elements = document.select("ul.currentStreamLinks > li > a")
|
val elements = document.select("ul.currentStreamLinks > li > a")
|
||||||
val hosterSelection = preferences.getStringSet("hoster_selection", setOf("voe", "stape"))
|
val hosterSelection = preferences.getStringSet("hoster_selection", setOf("voe", "stape", "evo"))
|
||||||
for (element in elements) {
|
for (element in elements) {
|
||||||
val url = element.attr("abs:href")
|
val url = element.attr("abs:href")
|
||||||
when {
|
when {
|
||||||
@ -91,7 +92,9 @@ class FilmPalast : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||||||
val script = doc.select("script:containsData(const sources = {)").toString()
|
val script = doc.select("script:containsData(const sources = {)").toString()
|
||||||
val videoUrl = script.substringAfter("\"hls\": \"").substringBefore("\",")
|
val videoUrl = script.substringAfter("\"hls\": \"").substringBefore("\",")
|
||||||
val video = Video(url, quality, videoUrl, null)
|
val video = Video(url, quality, videoUrl, null)
|
||||||
videoList.add(video)
|
if (video != null) {
|
||||||
|
videoList.add(video)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,21 +104,51 @@ class FilmPalast : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||||||
url.contains("https://streamtape.com") && hosterSelection?.contains("stape") == true -> {
|
url.contains("https://streamtape.com") && hosterSelection?.contains("stape") == true -> {
|
||||||
try {
|
try {
|
||||||
with(
|
with(
|
||||||
client.newCall(GET(url, headers = Headers.headersOf("Referer", baseUrl, "Cookie", "Fuck Streamtape because they add concatenation to fuck up scrapers")))
|
client.newCall(
|
||||||
|
GET(
|
||||||
|
url,
|
||||||
|
headers = Headers.headersOf(
|
||||||
|
"Referer",
|
||||||
|
baseUrl,
|
||||||
|
"Cookie",
|
||||||
|
"Fuck Streamtape because they add concatenation to fuck up scrapers"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
.execute().asJsoup()
|
.execute().asJsoup()
|
||||||
) {
|
) {
|
||||||
linkRegex.find(this.select("script:containsData(document.getElementById('robotlink'))").toString())?.let {
|
linkRegex.find(
|
||||||
|
this.select("script:containsData(document.getElementById('robotlink'))").toString()
|
||||||
|
)?.let {
|
||||||
val quality = "Streamtape"
|
val quality = "Streamtape"
|
||||||
val videoUrl = "https://streamtape.com/get_video?${it.groupValues[1]}&stream=1".replace("""" + '""", "")
|
val videoUrl = "https://streamtape.com/get_video?${it.groupValues[1]}&stream=1".replace(
|
||||||
|
"""" + '""",
|
||||||
|
""
|
||||||
|
)
|
||||||
val video = Video(videoUrl, quality, videoUrl, null)
|
val video = Video(videoUrl, quality, videoUrl, null)
|
||||||
videoList.add(video)
|
if (video != null) {
|
||||||
|
videoList.add(video)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
url.contains("https://evoload.io") && hosterSelection?.contains("evo") == true -> {
|
||||||
|
val quality = "Evoload"
|
||||||
|
if (document.select("#EvoVid_html5_api").attr("src").contains("EvoStreams")) {
|
||||||
|
val videoUrl = document.select("#EvoVid_html5_api").attr("src")
|
||||||
|
if (Video(videoUrl, quality, videoUrl, null) != null) {
|
||||||
|
videoList.add(Video(videoUrl, quality, videoUrl, null))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
EvoloadExtractor(client).videoFromUrl(url, quality)
|
||||||
|
videoList.addAll(EvoloadExtractor(client).videoFromUrl(url, quality))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return videoList
|
return videoList
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,8 +241,8 @@ class FilmPalast : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||||||
val hosterPref = ListPreference(screen.context).apply {
|
val hosterPref = ListPreference(screen.context).apply {
|
||||||
key = "preferred_hoster"
|
key = "preferred_hoster"
|
||||||
title = "Standard-Hoster"
|
title = "Standard-Hoster"
|
||||||
entries = arrayOf("Voe", "Streamtape")
|
entries = arrayOf("Voe", "Streamtape", "Evoload")
|
||||||
entryValues = arrayOf("https://voe.sx", "https://streamtape.com")
|
entryValues = arrayOf("https://voe.sx", "https://streamtape.com", "https://evoload.io")
|
||||||
setDefaultValue("https://voe.sx")
|
setDefaultValue("https://voe.sx")
|
||||||
summary = "%s"
|
summary = "%s"
|
||||||
|
|
||||||
@ -223,9 +256,9 @@ class FilmPalast : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||||||
val subSelection = MultiSelectListPreference(screen.context).apply {
|
val subSelection = MultiSelectListPreference(screen.context).apply {
|
||||||
key = "hoster_selection"
|
key = "hoster_selection"
|
||||||
title = "Hoster auswählen"
|
title = "Hoster auswählen"
|
||||||
entries = arrayOf("Voe", "Streamtape")
|
entries = arrayOf("Voe", "Streamtape", "Evoload")
|
||||||
entryValues = arrayOf("voe", "stape")
|
entryValues = arrayOf("voe", "stape", "evo")
|
||||||
setDefaultValue(setOf("voe", "stape"))
|
setDefaultValue(setOf("voe", "stape", "evo"))
|
||||||
|
|
||||||
setOnPreferenceChangeListener { _, newValue ->
|
setOnPreferenceChangeListener { _, newValue ->
|
||||||
preferences.edit().putStringSet(key, newValue as Set<String>).commit()
|
preferences.edit().putStringSet(key, newValue as Set<String>).commit()
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
package eu.kanade.tachiyomi.animeextension.de.filmpalast.extractors
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.animesource.model.Video
|
||||||
|
import eu.kanade.tachiyomi.network.GET
|
||||||
|
import eu.kanade.tachiyomi.network.POST
|
||||||
|
import okhttp3.MediaType.Companion.toMediaType
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
|
|
||||||
|
class EvoloadExtractor(private val client: OkHttpClient) {
|
||||||
|
|
||||||
|
fun videoFromUrl(url: String, quality: String): List<Video> {
|
||||||
|
val videoList = mutableListOf<Video>()
|
||||||
|
val id = url.substringAfter("https://evoload.io/e/")
|
||||||
|
val csrv_token =
|
||||||
|
client.newCall(GET("https://csrv.evosrv.com/captcha?m412548=")).execute().body!!.string() // whatever that is
|
||||||
|
val captchaPass = client.newCall(GET("https://cd2.evosrv.com/html/jsx/e.jsx")).execute().toString()
|
||||||
|
.substringAfter("var captcha_pass = '").substringBefore("'")
|
||||||
|
val file = client.newCall(
|
||||||
|
POST(
|
||||||
|
"https://evoload.io/SecurePlayer",
|
||||||
|
body = "{\"code\":\"$id\",\"token\":\"ok\",\"csrv_token\":\"$csrv_token\",\"pass\":\"$captchaPass\",\"reff\":\"https://filmpalast.to/\"}".toRequestBody("application/json".toMediaType())
|
||||||
|
)
|
||||||
|
).execute().body!!.string()
|
||||||
|
val src = file.substringAfter("\"src\":\"").substringBefore("\",")
|
||||||
|
val res = client.newCall(POST(src)).execute()
|
||||||
|
val videoUrl = res.request.url.toString()
|
||||||
|
videoList.addAll(listOf(Video(url, quality, videoUrl, null)))
|
||||||
|
return videoList
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user