我试图将推文下载到csv中来训练机器人,但我被这个索引器卡住了。 错误在最后一行:
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
错误消息:在下载推文中 limit=twint.output.users\u list[-1]。tweets 索引器:列表索引超出范围
目前没有回答
相关问题 更多 >
编程相关推荐