Closed vsnig closed 7 months ago
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Will be added in v0.12.
Usage:
from twscrape import API, NoAccountError
api = API(raise_when_no_account=True)
try:
api.search("foo", limit=10)
except NoAccountError:
pass
Or with environment variable:
TWS_RAISE_WHEN_NO_ACCOUNT=1 twscrape tweet_details 1778577341163110904
I think we need an option to just exit when there's no good account. It's appropriate when running on AWS Lambda
P.S. now I'm thinking that probably the best option is to raise an Exception. This way we can use Lambda's native retry mechanism, or catch and ignore or react the way we wish