chore(src/de): Remove dead sources (#3202)

This commit is contained in:
LuftVerbot 2024-04-28 22:25:01 +02:00 committed by GitHub
parent ebb2163465
commit 21fe3802c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 0 additions and 699 deletions

View File

@ -1,14 +0,0 @@
ext {
extName = 'Aniflix'
extClass = '.Aniflix'
extVersionCode = 28
}
apply from: "$rootDir/common.gradle"
dependencies {
implementation(project(':lib:streamlare-extractor'))
implementation(project(':lib:voe-extractor'))
implementation(project(':lib:streamtape-extractor'))
implementation(project(':lib:dood-extractor'))
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -1,296 +0,0 @@
package eu.kanade.tachiyomi.animeextension.de.aniflix
import android.app.Application
import android.content.SharedPreferences
import androidx.preference.ListPreference
import androidx.preference.MultiSelectListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.animeextension.de.aniflix.dto.AnimeDetailsDto
import eu.kanade.tachiyomi.animeextension.de.aniflix.dto.AnimeDto
import eu.kanade.tachiyomi.animeextension.de.aniflix.dto.Episode
import eu.kanade.tachiyomi.animeextension.de.aniflix.dto.Release
import eu.kanade.tachiyomi.animeextension.de.aniflix.dto.Season
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
import eu.kanade.tachiyomi.animesource.model.AnimesPage
import eu.kanade.tachiyomi.animesource.model.SAnime
import eu.kanade.tachiyomi.animesource.model.SEpisode
import eu.kanade.tachiyomi.animesource.model.Video
import eu.kanade.tachiyomi.animesource.online.AnimeHttpSource
import eu.kanade.tachiyomi.lib.doodextractor.DoodExtractor
import eu.kanade.tachiyomi.lib.streamlareextractor.StreamlareExtractor
import eu.kanade.tachiyomi.lib.streamtapeextractor.StreamTapeExtractor
import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import kotlinx.serialization.builtins.ListSerializer
import kotlinx.serialization.json.Json
import okhttp3.Headers
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody
import okhttp3.Response
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
class Aniflix : ConfigurableAnimeSource, AnimeHttpSource() {
override val name = "Aniflix"
override val baseUrl = "https://aniflix.cc"
override val lang = "de"
override val supportsLatest = true
private val preferences: SharedPreferences by lazy {
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
}
private val json = Json {
isLenient = true
ignoreUnknownKeys = true
}
private val refererHeader = Headers.headersOf("Referer", baseUrl)
override fun getAnimeUrl(anime: SAnime): String {
return baseUrl + anime.url.replace("api/", "")
}
override fun animeDetailsParse(response: Response): SAnime {
val anime = json.decodeFromString(AnimeDetailsDto.serializer(), response.body.string())
val newAnime = SAnime.create().apply {
title = anime.name!!
setUrlWithoutDomain("$baseUrl/api/show/" + anime.url!!)
if (anime.coverPortrait != null) {
thumbnail_url = "$baseUrl/storage/" + anime.coverPortrait
}
description = anime.description
if (anime.airing == 0) {
status = SAnime.COMPLETED
} else if (anime.airing == 1) {
status = SAnime.ONGOING
}
genre = anime.genres?.joinToString { it.name!! }
}
return newAnime
}
override fun popularAnimeRequest(page: Int): Request = GET("$baseUrl/api/show/new/${page - 1}", refererHeader)
override fun popularAnimeParse(response: Response) = parseAnimePage(response)
private fun parseAnimePage(response: Response, singlePage: Boolean = false): AnimesPage {
val animes = json.decodeFromString(ListSerializer(AnimeDto.serializer()), response.body.string())
if (animes.isEmpty()) return AnimesPage(emptyList(), false)
val animeList = mutableListOf<SAnime>()
for (anime in animes) {
val newAnime = createAnime(anime)
animeList.add(newAnime)
}
return AnimesPage(animeList, !singlePage)
}
private fun createAnime(anime: AnimeDto): SAnime {
return SAnime.create().apply {
title = anime.name!!
setUrlWithoutDomain("$baseUrl/api/show/" + anime.url!!)
if (anime.coverPortrait != null) {
thumbnail_url = "$baseUrl/storage/" + anime.coverPortrait
}
description = anime.description
if (anime.airing == 0) {
status = SAnime.COMPLETED
} else if (anime.airing == 1) {
status = SAnime.ONGOING
}
}
}
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/api/show/airing/${page - 1}", refererHeader)
override fun latestUpdatesParse(response: Response): AnimesPage {
val releases = json.decodeFromString(ListSerializer(Release.serializer()), response.body.string()).toMutableList()
if (releases.isEmpty()) return AnimesPage(emptyList(), false)
val animeList = mutableListOf<SAnime>()
val releaseList = mutableListOf<Int>()
for (release in releases) {
if (release.season!!.anime!!.id in releaseList) continue
releaseList.add(release.season.anime!!.id!!)
val anime = release.season.anime
val newAnime = SAnime.create().apply {
title = anime.name!!
setUrlWithoutDomain("$baseUrl/api/show/" + anime.url!!)
if (anime.coverPortrait != null) {
thumbnail_url = "$baseUrl/storage/" + anime.coverPortrait
}
description = anime.description
if (anime.airing == 0) {
status = SAnime.COMPLETED
} else if (anime.airing == 1) {
status = SAnime.ONGOING
}
}
animeList.add(newAnime)
}
return AnimesPage(animeList, true)
}
override fun searchAnimeRequest(page: Int, query: String, filters: AnimeFilterList) = POST(
url = "$baseUrl/api/show/search",
headers = refererHeader,
body = "{\"search\":\"$query\"}".toRequestBody("application/json".toMediaType()),
)
override fun searchAnimeParse(response: Response) = parseAnimePage(response, singlePage = true)
override fun episodeListParse(response: Response): List<SEpisode> {
val anime = json.decodeFromString(AnimeDetailsDto.serializer(), response.body.string())
if (anime.seasons.isNullOrEmpty()) return emptyList()
val episodeList = mutableListOf<SEpisode>()
val animeUrl = anime.url!!
for (season in anime.seasons) {
val episodes = season.episodes!!.toMutableList()
var page = 1
while (episodes.size < season.length!!) {
val seasonPart = json.decodeFromString(
Season.serializer(),
client.newCall(
GET("$baseUrl/api/show/$animeUrl/${season.id!!}/$page"),
).execute().body.string(),
)
page++
episodes.addAll(seasonPart.episodes!!)
}
for (episode in episodes) {
val newEpisode = SEpisode.create().apply {
setUrlWithoutDomain("$baseUrl/api/episode/show/$animeUrl/season/${season.number!!}/episode/${episode.number}")
episode_number = episode.number!!.toFloat()
name = "Staffel ${season.number}: Folge ${episode.number}"
}
episodeList.add(newEpisode)
}
}
return episodeList.reversed()
}
override fun videoListParse(response: Response): List<Video> {
val streams = json.decodeFromString(Episode.serializer(), response.body.string()).streams
if (streams.isNullOrEmpty()) return emptyList()
val videoList = mutableListOf<Video>()
for (stream in streams) {
val quality = "${stream.hoster?.name}, ${stream.lang}"
val link = stream.link ?: return emptyList()
val hosterSelection = preferences.getStringSet("hoster_selection", setOf("dood", "stape", "voe", "slare"))
when {
link.contains("https://dood") && hosterSelection?.contains("dood") == true -> {
val video = try { DoodExtractor(client).videoFromUrl(link, quality, false) } catch (e: Exception) { null }
if (video != null) {
videoList.add(video)
}
}
link.contains("https://streamtape") && hosterSelection?.contains("stape") == true -> {
val video = StreamTapeExtractor(client).videoFromUrl(link, quality)
if (video != null) {
videoList.add(video)
}
}
link.contains("https://voe.sx") && hosterSelection?.contains("voe") == true -> {
videoList.addAll(VoeExtractor(client).videosFromUrl(link, "(${stream.lang}) "))
}
link.contains("https://streamlare") && hosterSelection?.contains("slare") == true -> {
videoList.addAll(StreamlareExtractor(client).videosFromUrl(link, suffix = stream.lang ?: "Unknown language"))
}
}
}
return videoList
}
override fun List<Video>.sort(): List<Video> {
val hoster = preferences.getString("preferred_hoster", null)
val subPreference = preferences.getString("preferred_sub", "SUB")!!
val hosterList = mutableListOf<Video>()
val otherList = mutableListOf<Video>()
if (hoster != null) {
for (video in this) {
if (video.url.contains(hoster)) {
hosterList.add(video)
} else {
otherList.add(video)
}
}
} else {
otherList += this
}
val newList = mutableListOf<Video>()
var preferred = 0
for (video in hosterList) {
if (video.quality.contains(subPreference)) {
newList.add(preferred, video)
preferred++
} else {
newList.add(video)
}
}
for (video in otherList) {
if (video.quality.contains(subPreference)) {
newList.add(preferred, video)
preferred++
} else {
newList.add(video)
}
}
return newList
}
override fun videoUrlParse(response: Response) = throw UnsupportedOperationException()
@Suppress("UNCHECKED_CAST")
override fun setupPreferenceScreen(screen: PreferenceScreen) {
val hosterPref = ListPreference(screen.context).apply {
key = "preferred_hoster"
title = "Standard-Hoster"
entries = arrayOf("Streamtape", "Doodstream", "Voe", "Streamlare")
entryValues = arrayOf("https://streamtape.com", "https://dood", "https://voe.sx", "https://streamlare.com")
setDefaultValue("https://streamtape.com")
summary = "%s"
setOnPreferenceChangeListener { _, newValue ->
val selected = newValue as String
val index = findIndexOfValue(selected)
val entry = entryValues[index] as String
preferences.edit().putString(key, entry).commit()
}
}
val subPref = ListPreference(screen.context).apply {
key = "preferred_sub"
title = "Standardmäßig Sub oder Dub?"
entries = arrayOf("Sub", "Dub")
entryValues = arrayOf("SUB", "DUB")
setDefaultValue("SUB")
summary = "%s"
setOnPreferenceChangeListener { _, newValue ->
val selected = newValue as String
val index = findIndexOfValue(selected)
val entry = entryValues[index] as String
preferences.edit().putString(key, entry).commit()
}
}
val subSelection = MultiSelectListPreference(screen.context).apply {
key = "hoster_selection"
title = "Hoster auswählen"
entries = arrayOf("Streamtape", "Doodstream", "Voe", "Streamlare")
entryValues = arrayOf("stape", "dood", "voe", "slare")
setDefaultValue(setOf("stape", "dood", "voe", "slare"))
setOnPreferenceChangeListener { _, newValue ->
preferences.edit().putStringSet(key, newValue as Set<String>).commit()
}
}
screen.addPreference(subPref)
screen.addPreference(hosterPref)
screen.addPreference(subSelection)
}
}

View File

@ -1,121 +0,0 @@
package eu.kanade.tachiyomi.animeextension.de.aniflix.dto
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.builtins.serializer
import kotlinx.serialization.json.JsonElement
import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.JsonPrimitive
import kotlinx.serialization.json.JsonTransformingSerializer
@Serializable
data class AnimeDto(
@SerialName("airing")
@Serializable(with = IntSerializer::class)
val airing: Int? = null,
@SerialName("cover_portrait")
val coverPortrait: String? = null,
@SerialName("created_at")
val createdAt: String? = null,
@SerialName("description")
val description: String? = null,
@SerialName("id")
val id: Int? = null,
@SerialName("name")
val name: String? = null,
@SerialName("url")
val url: String? = null,
)
object IntSerializer : JsonTransformingSerializer<Int>(Int.serializer()) {
// If response is not a primitive, then return something else
override fun transformDeserialize(element: JsonElement): JsonElement =
when (element) {
is JsonObject -> JsonPrimitive(1)
is JsonPrimitive -> element
else -> JsonPrimitive(-1)
}
}
@Serializable
data class AnimeDetailsDto(
@SerialName("airing")
@Serializable(with = IntSerializer::class)
val airing: Int? = null,
@SerialName("cover_portrait")
val coverPortrait: String? = null,
@SerialName("created_at")
val createdAt: String? = null,
@SerialName("description")
val description: String? = null,
@SerialName("genres")
val genres: List<Genre>? = null,
@SerialName("id")
val id: Int? = null,
@SerialName("name")
val name: String? = null,
@SerialName("url")
val url: String? = null,
@SerialName("seasons")
val seasons: List<Season>? = null,
)
@Serializable
data class Season(
@SerialName("episodes")
val episodes: List<Episode>? = null,
@SerialName("number")
val number: Int? = null,
@SerialName("id")
val id: Int? = null,
@SerialName("length")
val length: Int? = null,
)
@Serializable
data class Episode(
@SerialName("created_at")
val createdAt: String? = null,
@SerialName("number")
val number: Int? = null,
@SerialName("name")
val name: String? = null,
@SerialName("streams")
val streams: List<Stream>? = null,
)
@Serializable
data class Release(
@SerialName("season")
val season: ShortSeason? = null,
)
@Serializable
data class ShortSeason(
@SerialName("show")
val anime: AnimeDto? = null,
)
@Serializable
data class Stream(
@SerialName("link")
val link: String? = null,
@SerialName("lang")
val lang: String? = null,
@SerialName("hoster")
val hoster: Hoster? = null,
)
@Serializable
data class Hoster(
@SerialName("name")
val name: String? = null,
)
@Serializable
data class Genre(
@SerialName("name")
val name: String? = null,
@SerialName("id")
val id: Int? = null,
)

View File

@ -1,12 +0,0 @@
ext {
extName = 'Aniking'
extClass = '.Aniking'
extVersionCode = 17
}
apply from: "$rootDir/common.gradle"
dependencies {
implementation(project(':lib:streamtape-extractor'))
implementation(project(':lib:dood-extractor'))
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -1,234 +0,0 @@
package eu.kanade.tachiyomi.animeextension.de.aniking
import android.app.Application
import android.content.SharedPreferences
import androidx.preference.ListPreference
import androidx.preference.MultiSelectListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.animeextension.de.aniking.extractors.StreamZExtractor
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
import eu.kanade.tachiyomi.animesource.model.SAnime
import eu.kanade.tachiyomi.animesource.model.SEpisode
import eu.kanade.tachiyomi.animesource.model.Video
import eu.kanade.tachiyomi.animesource.online.ParsedAnimeHttpSource
import eu.kanade.tachiyomi.lib.doodextractor.DoodExtractor
import eu.kanade.tachiyomi.lib.streamtapeextractor.StreamTapeExtractor
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
class Aniking : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
override val name = "Aniking"
override val baseUrl = "https://aniking.cc"
override val lang = "de"
override val supportsLatest = false
private val preferences: SharedPreferences by lazy {
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
}
// ============================== Popular ===============================
override fun popularAnimeSelector() = "div.item-container div.item > a"
override fun popularAnimeRequest(page: Int) = GET("$baseUrl/page/$page/?order=rating", headers = headers)
override fun popularAnimeFromElement(element: Element) = SAnime.create().apply {
setUrlWithoutDomain(element.attr("href"))
thumbnail_url = element.selectFirst("img")!!.attr("data-src")
title = element.selectFirst("h2")!!.text()
}
override fun popularAnimeNextPageSelector() = "div.pagination i#nextpagination"
// ============================== Episodes ==============================
override fun episodeListSelector() = throw UnsupportedOperationException()
override fun episodeListParse(response: Response): List<SEpisode> {
val document = response.asJsoup()
return if (document.selectFirst("#movie-js-extra") == null) {
val episodeElement = document.selectFirst("script[id=\"tv-js-after\"]")!!
episodeElement.data()
.substringAfter("var streaming = {")
.substringBefore("}; var")
.split(",")
.map(::episodeFromString)
.reversed()
} else {
SEpisode.create().apply {
name = document.selectFirst("h1.entry-title")!!.text()
episode_number = 1F
setUrlWithoutDomain(document.location())
}.let(::listOf)
}
}
override fun episodeFromElement(element: Element): SEpisode = throw UnsupportedOperationException()
private fun episodeFromString(string: String) = SEpisode.create().apply {
val season = string.substringAfter("\"s").substringBefore("_")
val ep = string.substringAfter("_").substringBefore("\":")
episode_number = ep.toFloatOrNull() ?: 1F
name = "Staffel $season Folge $ep"
url = string.substringAfter(":\"").substringBefore('"').replace("\\", "")
}
// ============================ Video Links =============================
override fun videoListRequest(episode: SEpisode): Request {
if (!episode.url.contains("https://")) {
return GET("$baseUrl${episode.url}")
} else {
return GET(episode.url.replace(baseUrl, ""))
}
}
override fun videoListParse(response: Response): List<Video> {
val url = response.request.url.toString()
val hosterSelection = preferences.getStringSet(PREF_SELECTION_KEY, PREF_SELECTION_DEFAULT)!!
return if (!url.contains(baseUrl)) {
videoListFromUrl(url, hosterSelection)
} else {
val document = response.asJsoup()
document.select("div.multi a").flatMap {
videoListFromUrl(it.attr("href"), hosterSelection)
}
}
}
private fun videoListFromUrl(url: String, hosterSelection: Set<String>): List<Video> {
return runCatching {
when {
"https://dood" in url && "dood" in hosterSelection -> {
DoodExtractor(client)
.videoFromUrl(url, "Doodstream", redirect = false)
?.let(::listOf)
}
"https://streamtape" in url && "stape" in hosterSelection -> {
StreamTapeExtractor(client).videoFromUrl(url, "Streamtape")
?.let(::listOf)
}
("https://streamz" in url || "https://streamcrypt.net" in url) && "streamz" in hosterSelection -> {
val realUrl = when {
"https://streamcrypt.net" in url -> {
client.newCall(GET(url, headers)).execute().use {
it.request.url.toString()
}
}
else -> url
}
StreamZExtractor(client).videoFromUrl(realUrl, "StreamZ")
?.let(::listOf)
}
else -> null
}
}.getOrNull() ?: emptyList()
}
override fun List<Video>.sort(): List<Video> {
val quality = preferences.getString(PREF_HOSTER_KEY, PREF_HOSTER_DEFAULT)!!
return sortedWith(
compareBy { it.quality.contains(quality) },
).reversed()
}
override fun videoListSelector() = throw UnsupportedOperationException()
override fun videoFromElement(element: Element) = throw UnsupportedOperationException()
override fun videoUrlParse(document: Document) = throw UnsupportedOperationException()
// =============================== Search ===============================
// TODO: Implement search filters
override fun searchAnimeFromElement(element: Element) = popularAnimeFromElement(element)
override fun searchAnimeNextPageSelector() = popularAnimeNextPageSelector()
override fun searchAnimeSelector() = popularAnimeSelector()
override fun searchAnimeRequest(page: Int, query: String, filters: AnimeFilterList): Request {
return GET("$baseUrl/page/$page/?s=$query", headers)
}
// =========================== Anime Details ============================
override fun animeDetailsParse(document: Document) = SAnime.create().apply {
thumbnail_url = document.selectFirst("div.tv-poster img")!!.attr("src")
title = document.selectFirst("h1.entry-title")!!.text()
genre = document.select("span[itemprop=genre] a").eachText().joinToString()
description = document.selectFirst("p.movie-description > span")!!
.ownText()
.substringBefore("Tags:")
author = document.select("div.name a").eachText().joinToString().takeIf(String::isNotBlank)
status = parseStatus(document.selectFirst("span.stato")?.text())
}
private fun parseStatus(status: String?) = when (status) {
"Returning Series" -> SAnime.ONGOING
else -> SAnime.COMPLETED
}
// =============================== Latest ===============================
override fun latestUpdatesNextPageSelector(): String = throw UnsupportedOperationException()
override fun latestUpdatesFromElement(element: Element): SAnime = throw UnsupportedOperationException()
override fun latestUpdatesRequest(page: Int): Request = throw UnsupportedOperationException()
override fun latestUpdatesSelector(): String = throw UnsupportedOperationException()
// ============================== Settings ==============================
override fun setupPreferenceScreen(screen: PreferenceScreen) {
ListPreference(screen.context).apply {
key = PREF_HOSTER_KEY
title = PREF_HOSTER_TITLE
entries = PREF_HOSTER_ENTRIES
entryValues = PREF_HOSTER_VALUES
setDefaultValue(PREF_HOSTER_DEFAULT)
summary = "%s"
setOnPreferenceChangeListener { _, newValue ->
val selected = newValue as String
val index = findIndexOfValue(selected)
val entry = entryValues[index] as String
preferences.edit().putString(key, entry).commit()
}
}.also(screen::addPreference)
MultiSelectListPreference(screen.context).apply {
key = PREF_SELECTION_KEY
title = PREF_SELECTION_TITLE
entries = PREF_SELECTION_ENTRIES
entryValues = PREF_SELECTION_VALUES
setDefaultValue(PREF_SELECTION_DEFAULT)
setOnPreferenceChangeListener { _, newValue ->
@Suppress("UNCHECKED_CAST")
preferences.edit().putStringSet(key, newValue as Set<String>).commit()
}
}.also(screen::addPreference)
}
companion object {
private const val PREF_HOSTER_KEY = "preferred_hoster"
private const val PREF_HOSTER_TITLE = "Standard-Hoster"
private const val PREF_HOSTER_DEFAULT = "https://streamtape.com"
private val PREF_HOSTER_ENTRIES = arrayOf("Streamtape", "Doodstream", "StreamZ")
private val PREF_HOSTER_VALUES = arrayOf("https://streamz.ws", "https://dood", "https://voe.sx")
private const val PREF_SELECTION_KEY = "hoster_selection"
private const val PREF_SELECTION_TITLE = "Hoster auswählen"
private val PREF_SELECTION_ENTRIES = PREF_HOSTER_ENTRIES
private val PREF_SELECTION_VALUES = arrayOf("stape", "dood", "streamz")
private val PREF_SELECTION_DEFAULT = PREF_SELECTION_VALUES.toSet()
}
}

View File

@ -1,22 +0,0 @@
package eu.kanade.tachiyomi.animeextension.de.aniking.extractors
import eu.kanade.tachiyomi.animesource.model.Video
import eu.kanade.tachiyomi.network.GET
import okhttp3.Headers
import okhttp3.OkHttpClient
class StreamZExtractor(private val client: OkHttpClient) {
fun videoFromUrl(url: String, quality: String): Video? {
val link = client.newCall(GET(url)).execute().request.url.toString()
val dllpart = link.substringAfter("/y")
val videoUrl = client.newCall(
GET(
"https://get.streamz.tw/getlink-$dllpart.dll",
headers = Headers.headersOf("referer", "https://streamz.ws/", "accept", "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5", "range", "bytes=0-"),
),
)
.execute().request.url.toString()
return Video(url, quality, videoUrl)
}
}