我正在尝试使用此 lib 从 python 中的用户检索所有推文.
python-twitter 中提供的方法定义为:
def GetUserTimeline(self,
user_id=None,
screen_name=None,
since_id=None,
max_id=None,
count=None,
include_rts=None,
trim_user=None,
exclude_replies=None):
如果计数限制为 200。
文档:
count: Specifies the number of statuses to retrieve. May not be greater than 200. [Optional]
我现在的问题是:是否可以使用此库检索用户的所有推文?还有其他解决方案吗?
最佳答案
简短的回答:没有。
Twitter API 明确表示您不能每次请求从用户那里检索超过 200 条推文,因此这不是您正在使用的这个特定库的限制,而是 Twitter 强加的限制。但请记住,这是针对每个请求的,如果您将发送多个请求,您可以获得总共最多 3200 条推文。但这仍然意味着您无法获取所有推文,只能获取 3200 条。
Here is official Twitter API statuses/user_timeline endpoint documentation.
关于python - 使用 python-twitter 从用户获取所有推文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17739716/