Skip to content

Commit a7e8b1b

Browse files
authored
Merge pull request #2184 from Luna712/fix-future-build
Fix one more build issue on future version of Kotlin
2 parents 0ad0577 + ea474ee commit a7e8b1b

File tree

1 file changed

+4
-6
lines changed
  • library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors

1 file changed

+4
-6
lines changed

library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/AStreamHub.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ open class AStreamHub : ExtractorApi() {
1515

1616
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {
1717
val sources = mutableListOf<ExtractorLink>()
18-
app.get(url).document.selectFirst("body > script")?.let { script ->
19-
val text = script.html()
20-
Log.i("Dev", "text => $text")
21-
if (text.isNotBlank()) {
22-
val m3link = "(?<=file:)(.*)(?=,)".toRegex().find(text)
18+
app.get(url).document.selectFirst("body > script")?.data()?.let { script ->
19+
Log.i("Dev", "script => $script")
20+
if (script.isNotBlank()) {
21+
val m3link = "(?<=file:)(.*)(?=,)".toRegex().find(script)
2322
?.groupValues?.get(0)?.trim()?.trim('"') ?: ""
2423
Log.i("Dev", "m3link => $m3link")
2524
if (m3link.isNotBlank()) {
@@ -39,5 +38,4 @@ open class AStreamHub : ExtractorApi() {
3938
}
4039
return sources
4140
}
42-
4341
}

0 commit comments

Comments
 (0)