зеркало из
https://github.com/viginum-datalab/twscrape.git
synced 2025-10-28 20:54:24 +02:00
fix login when no ct0 found #143
Этот коммит содержится в:
родитель
728ff6ab69
Коммит
e921e9e408
@ -242,11 +242,11 @@ async def login(acc: Account, cfg: LoginConfig | None = None) -> Account:
|
||||
rep = await login_initiate(client)
|
||||
ctx = TaskCtx(client, acc, cfg, None, imap)
|
||||
while True:
|
||||
rep = await next_login_task(ctx, rep)
|
||||
if not rep:
|
||||
break
|
||||
|
||||
rep = await next_login_task(ctx, rep)
|
||||
|
||||
assert "ct0" in client.cookies, "ct0 not in cookies (most likely ip ban)"
|
||||
client.headers["x-csrf-token"] = client.cookies["ct0"]
|
||||
client.headers["x-twitter-auth-type"] = "OAuth2Session"
|
||||
|
||||
|
||||
Загрузка…
x
Ссылка в новой задаче
Block a user