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 = "" var bodyText = ""
val doc = app.get(url, referer = referer).document val doc = app.get(url, referer = referer).document
//Log.i(this.name, "Result => (url, script) $url / ${doc.select("script")}") //Log.i(this.name, "Result => (url, script) $url / ${doc.select("script")}")
doc.select("script").forEach { bodyText = doc.select("script").firstOrNull {
val text = it?.toString() ?: "" val text = it?.toString() ?: ""
if (text.isNotBlank()) { text.contains("var idUser")
if (text.contains("var idUser")) { }?.toString() ?: ""
bodyText = text
//Log.i(this.name, "Result => (bodyText) $bodyText")
}
}
}
//Log.i(this.name, "Result => (bodyText) $bodyText") //Log.i(this.name, "Result => (bodyText) $bodyText")
if (bodyText.isNotBlank()) { if (bodyText.isNotBlank()) {
idUser = "(?<=var idUser = \")(.*)(?=\";)".toRegex().find(bodyText) idUser = "(?<=var idUser = \")(.*)(?=\";)".toRegex().find(bodyText)