Этот коммит содержится в:
Vlad Pronsky 2024-04-17 01:53:03 +03:00
родитель 728ff6ab69
Коммит e921e9e408

Просмотреть файл

@ -242,11 +242,11 @@ async def login(acc: Account, cfg: LoginConfig | None = None) -> Account:
rep = await login_initiate(client) rep = await login_initiate(client)
ctx = TaskCtx(client, acc, cfg, None, imap) ctx = TaskCtx(client, acc, cfg, None, imap)
while True: while True:
rep = await next_login_task(ctx, rep)
if not rep: if not rep:
break 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-csrf-token"] = client.cookies["ct0"]
client.headers["x-twitter-auth-type"] = "OAuth2Session" client.headers["x-twitter-auth-type"] = "OAuth2Session"