This commit is contained in:
hexated 2022-12-10 04:21:13 +07:00
parent 2876dea2d1
commit 489da5c5c4
2 changed files with 4 additions and 4 deletions

View File

@ -229,7 +229,7 @@ class Loklok : MainAPI() {
): Boolean { ): Boolean {
val res = parseJson<UrlEpisode>(data) val res = parseJson<UrlEpisode>(data)
res.definitionList?.map { video -> res.definitionList?.apmap { video ->
val body = """[{"category":${res.category},"contentId":"${res.id}","episodeId":${res.epId},"definition":"${video.code}"}]""".toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull()) val body = """[{"category":${res.category},"contentId":"${res.id}","episodeId":${res.epId},"definition":"${video.code}"}]""".toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull())
val response = app.post( val response = app.post(
"$apiUrl/media/bathGetplayInfo", "$apiUrl/media/bathGetplayInfo",
@ -241,7 +241,7 @@ class Loklok : MainAPI() {
ExtractorLink( ExtractorLink(
this.name, this.name,
this.name, this.name,
json?.mediaUrl ?: return@map null, json?.mediaUrl ?: return@apmap null,
"", "",
getQuality(json.currentDefinition ?: ""), getQuality(json.currentDefinition ?: ""),
isM3u8 = true, isM3u8 = true,

View File

@ -832,7 +832,7 @@ object SoraExtractor : SoraStream() {
) )
} }
json?.definitionList?.map { video -> json?.definitionList?.apmap { video ->
val body = """[{"category":$type,"contentId":"$id","episodeId":${json.id},"definition":"${video.code}"}]""".toRequestBody( val body = """[{"category":$type,"contentId":"$id","episodeId":${json.id},"definition":"${video.code}"}]""".toRequestBody(
RequestBodyTypes.JSON.toMediaTypeOrNull()) RequestBodyTypes.JSON.toMediaTypeOrNull())
val response = app.post( val response = app.post(
@ -844,7 +844,7 @@ object SoraExtractor : SoraStream() {
ExtractorLink( ExtractorLink(
this.name, this.name,
this.name, this.name,
response?.mediaUrl ?: return@map null, response?.mediaUrl ?: return@apmap null,
"", "",
getSoraQuality(response.currentDefinition ?: ""), getSoraQuality(response.currentDefinition ?: ""),
isM3u8 = true, isM3u8 = true,