Skip to content

Commit

Permalink
fix: check account active status
Browse files Browse the repository at this point in the history
This works better locally, where there might be
a sqlite db.
  • Loading branch information
andylolz committed May 13, 2024
1 parent 5edcb8d commit 579c28e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x_notes/tweets.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ async def login() -> API:
account_kwargs["cookies"] = cookies

await api.pool.add_account(**account_kwargs)
if not cookies:
account = await api.pool.get(username)
if not account.active:
logger.info("Attempting to log in")
await api.pool.login_all()
account = await api.pool.get(username)
Expand Down

0 comments on commit 579c28e

Please sign in to comment.