【问题标题】:Tweepy Get List of Favorites for a Specific UserTweepy 获取特定用户的收藏夹列表
【发布时间】:2017-02-11 22:15:20
【问题描述】:

我正在尝试获取特定用户发表的收藏推文列表。他们的 Twitter 帐户表明他们收藏了近 20k 条推文,但通过 API 返回的收藏列表只有大约 2,300 条收藏的推文。下面是我的python代码示例:

api = tweepy.API(auth)
test_user = "someuser"

#print out each favorited tweet
for page in tweepy.Cursor(api.favorites,id=test_user,wait_on_rate_limit=True, 
  count=200).pages(200):

  for status in page:
    print status.user.screen_name.encode('utf-8') + ": " 
      + status.text.encode('utf-8')

我假设 count = 200 和 pages = 200 最多会给我 40,000 条推文。我错过了什么吗?

【问题讨论】:

    标签: python api twitter tweepy


    【解决方案1】:

    通过对 twitter API 的深入研究,我们可以查询的推文数量似乎存在上限。请参阅 Twitter 开发者论坛中的 this question

    【讨论】:

      猜你喜欢
      • 2018-09-04
      • 2019-01-12
      • 2020-09-25
      • 1970-01-01
      • 2018-09-10
      • 2021-05-28
      • 2012-05-29
      • 2015-05-13
      • 1970-01-01
      相关资源
      最近更新 更多