Im trying to download tweets into a csv to train a bot but I'm stuck at this Indexerror. The error is in the last line:
def download_tweets(
username=None,
limit=None,
include_replies=False,
include_links=False,
strip_usertags=False,
strip_hashtags=False,
# If a limit is specificed, validate that it is a multiple of 20
if limit:
assert limit % 20 == 0, "`limit` must be a multiple of 20."
# If no limit specifed, estimate the total number of tweets from profile.
else:
c_lookup = twint.Config()
c_lookup.Username = username
c_lookup.Store_object = True
c_lookup.Hide_output = True
if include_links is True:
c_lookup.Links = "include"
else:
c_lookup.Links = "exclude"
twint.run.Lookup(c_lookup)
limit = twint.output.users_list[-1].tweets
Error message: in download_tweets limit = twint.output.users_list[-1].tweets IndexError: list index out of range
twint.output.users_list? - Carmoreno