From 04018cdaf450c69fef7e20e2b41e0765edcb4434 Mon Sep 17 00:00:00 2001 From: tursom Date: Thu, 26 Sep 2024 16:29:45 +0800 Subject: [PATCH] update --- main.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 3653347..a49cdf4 100644 --- a/main.py +++ b/main.py @@ -132,10 +132,6 @@ def flush_files(): def init_session(): - cookies = http.cookies.SimpleCookie() - cookies["SESSDATA"] = SESSDATA - cookies["SESSDATA"]["domain"] = "bilibili.com" - global session session = aiohttp.ClientSession() session.cookie_jar.update_cookies(cookies) @@ -171,7 +167,8 @@ clients = {} log_files = {} with open("cookie.txt", "r", encoding="utf-8") as f: - SESSDATA = f.read().strip() + cookies = http.cookies.SimpleCookie() + cookies.load(f.read().strip()) session: Optional[aiohttp.ClientSession] = None