[skip ci]refactor(lib): General refactoration (#1579)

This commit is contained in:
Claudemirovsky
2023-05-06 09:50:45 -03:00
committed by GitHub
parent b1f87d246c
commit d07a8f28bf
16 changed files with 124 additions and 118 deletions

View File

@ -12,7 +12,7 @@ class YourUploadExtractor(private val client: OkHttpClient) {
return runCatching {
val request = client.newCall(GET(url, headers = newHeaders)).execute()
val document = request.asJsoup()
val baseData = document.selectFirst("script:containsData(jwplayerOptions)")!!.data()
val baseData = document.selectFirst("script:containsData(jwplayerOptions)")?.data()
if (!baseData.isNullOrEmpty()) {
val basicUrl = baseData.substringAfter("file: '").substringBefore("',")
val quality = prefix + name