This commit is contained in:
tursom 2024-09-26 16:29:45 +08:00
parent 764c517224
commit 04018cdaf4

View File

@ -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