百度扫码登录优化

This commit is contained in:
lushunming 2025-10-17 13:24:55 +08:00
parent 932e6ebab5
commit f7b13b1b21
4 changed files with 4 additions and 8 deletions

View File

@ -10,7 +10,6 @@ import com.github.catvod.utils.Util
import com.github.catvod.utils.Util.MEDIA
import com.google.gson.JsonObject
import java.util.*
import java.util.concurrent.atomic.AtomicInteger
object BaiduDrive {
private val cache = mutableMapOf<String, String>();
@ -39,14 +38,11 @@ object BaiduDrive {
}
fun processShareLinks(urls: List<String>): Pair<List<String>, List<String>> {
val retry = AtomicInteger(3)
//首先确保cookie不为空
if (cookies.isEmpty() && retry.get() > 0) {
if (cookies.isEmpty()) {
BaiDuYunHandler.get().startScan()
cookies = BaiDuYunHandler.get().token
Thread.sleep(10000)
retry.decrementAndGet()
processShareLinks(urls)
}
if (urls.isEmpty()) return emptyList<String>() to emptyList()

Binary file not shown.

View File

@ -1 +1 @@
11bbc41a3dab2b417fb77d70c031dabf
53bfcd21daf6443ac9c0922ef11a640c

View File

@ -1,5 +1,5 @@
{
"spider": "https://andoridspidermt.netlify.app/jar/custom_spider.jar;md5;11bbc41a3dab2b417fb77d70c031dabf",
"spider": "https://andoridspidermt.netlify.app/jar/custom_spider.jar;md5;53bfcd21daf6443ac9c0922ef11a640c",
"lives": [
{
"name": "电视直播",