add return if fail in sora

This commit is contained in:
hexated 2022-11-09 09:34:31 +07:00
parent bf258e357b
commit 5ef54a80cd
1 changed files with 6 additions and 2 deletions

View File

@ -809,10 +809,14 @@ object SoraExtractor : SoraStream() {
val id = script.third?.last()
val type = script.third?.get(2)
val json = app.get(
val jsonResponse = app.get(
"$vipAPI/movieDrama/get?id=${id}&category=${type}",
headers = headers
).parsedSafe<Load>()?.data?.episodeVo?.first { it.seriesNo == (episode ?: 0) }
)
if(!jsonResponse.isSuccessful) return
val json = jsonResponse.parsedSafe<Load>()?.data?.episodeVo?.first { it.seriesNo == (episode ?: 0) }
json?.definitionList?.apmap { video ->
delay(1000)