This commit is contained in:
Jace 2022-09-02 18:31:50 +08:00
parent aa9ce3f963
commit c22f7b35f0

View file

@ -23,15 +23,10 @@ class PlayLtXyz: ExtractorApi() {
var bodyText = ""
val doc = app.get(url, referer = referer).document
//Log.i(this.name, "Result => (url, script) $url / ${doc.select("script")}")
doc.select("script").forEach {
bodyText = doc.select("script").firstOrNull {
val text = it?.toString() ?: ""
if (text.isNotBlank()) {
if (text.contains("var idUser")) {
bodyText = text
//Log.i(this.name, "Result => (bodyText) $bodyText")
}
}
}
text.contains("var idUser")
}?.toString() ?: ""
//Log.i(this.name, "Result => (bodyText) $bodyText")
if (bodyText.isNotBlank()) {
idUser = "(?<=var idUser = \")(.*)(?=\";)".toRegex().find(bodyText)