Skip to content

Commit

Permalink
chore: slightly clearer logging
Browse files Browse the repository at this point in the history
  • Loading branch information
andylolz committed May 12, 2024
1 parent c6350fa commit 4cc9219
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 @@ -10,7 +10,6 @@


async def login() -> API:
logger.info("Attempting to log in")
api = API()

username = environ["USER"]
Expand All @@ -25,10 +24,12 @@ async def login() -> API:
account_kwargs["proxy"] = proxy
cookies = environ.get("COOKIES")
if cookies:
logger.info("Cookie found. No need to login")
account_kwargs["cookies"] = cookies

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

0 comments on commit 4cc9219

Please sign in to comment.