【问题标题】:Is there a way to fetch twitter data whose dateCreated is above a given date?有没有办法获取 dateCreated 高于给定日期的 twitter 数据?
【发布时间】:2021-05-31 03:36:24
【问题描述】:

我想获取创建日期在 4 月 1 日以上的关注者、朋友和 user_timeline。 这是我现在获取这三个的方式

followers = tweepy.Cursor(self.api.followers, self.user_handle).items(max_limit)
followings = tweepy.Cursor(self.api.friends, self.user_handle).items(max_limit)
user_tweets = tweepy.Cursor(self.api.user_timeline, tweet_mode='extended').items(max_limit)

【问题讨论】:

    标签: python tweepy twitterapi-python


    【解决方案1】:

    This is a temporary work around it

    它正在整理满足日期要求的提取项目。不理想但接近解决方案

    对于推文,您可以使用 since_id 参数。默认情况下,较新的项目具有更大的 id,因此将自 id 指定为先前获取的数据中的最大 id 将为您提供新的结果。 关注者和朋友可能不是这种情况,因为我没有看到 since_id 参数并且关注者没有 follower_id 字段

    【讨论】:

      猜你喜欢
      • 2013-09-13
      • 1970-01-01
      • 2011-06-14
      • 2021-08-08
      • 1970-01-01
      • 2015-10-23
      • 2018-03-27
      • 1970-01-01
      相关资源
      最近更新 更多