small tweaks

This commit is contained in:
hexated 2022-12-17 05:29:01 +07:00
parent 5ed2658b08
commit b8d38be47c
1 changed files with 3 additions and 3 deletions

View File

@ -287,11 +287,11 @@ suspend fun bypassHrefli(url: String): String? {
val directLink = script?.substringAfter("\"href\",\"")?.substringBefore("\")") val directLink = script?.substringAfter("\"href\",\"")?.substringBefore("\")")
val matchCookies = val matchCookies =
Regex("sumitbot_\\('(\\S+?)',\n|.?'(\\S+?)',").findAll(script ?: return null).map { Regex("sumitbot_\\('(\\S+?)',\n|.?'(\\S+?)',").findAll(script ?: return null).map {
it.groupValues[1] to it.groupValues[2] it.groupValues[2]
}.toList() }.toList()
val cookeName = matchCookies.firstOrNull()?.second ?: return null val cookeName = matchCookies.firstOrNull() ?: return null
val cookeValue = matchCookies.lastOrNull()?.second ?: return null val cookeValue = matchCookies.lastOrNull() ?: return null
val cookies = mapOf( val cookies = mapOf(
cookeName to cookeValue cookeName to cookeValue