small fix

This commit is contained in:
hexated 2023-08-03 08:07:43 +07:00
parent 24f5f1a4db
commit c510461e47

View file

@ -2455,13 +2455,8 @@ object SoraExtractor : SoraStream() {
val request = app.get(url) val request = app.get(url)
if (!request.isSuccessful) return if (!request.isSuccessful) return
val paths = request.document.select("a").map {
val paths = request.document.select("tr.file").map { it.text() to it.attr("href")
Triple(
it.select("a").text(),
it.select("a").attr("href"),
it.select("size").text(),
)
}.filter { }.filter {
if (season == null) { if (season == null) {
it.first.contains(Regex("(?i)(1080p|2160p)")) it.first.contains(Regex("(?i)(1080p|2160p)"))
@ -2474,11 +2469,10 @@ object SoraExtractor : SoraStream() {
paths.map { paths.map {
val quality = getIndexQuality(it.first) val quality = getIndexQuality(it.first)
val tags = getIndexQualityTags(it.first) val tags = getIndexQualityTags(it.first)
val size = "%.2f GB".format(bytesToGigaBytes(it.third.toDouble()))
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
"DahmerMovies", "DahmerMovies",
"DahmerMovies $tags [$size]", "DahmerMovies $tags",
(url + it.second).encodeUrl(), (url + it.second).encodeUrl(),
"", "",
quality, quality,