[英]How to search twitter replies more than a month using tweepy.api?
I'm trying to find replies to a specific user of a specific tweet ID using code:我正在尝试使用代码查找对特定推文 ID 的特定用户的回复:
tweets = tweepy.Cursor(api.search,q='to:'+name, tweet_mode='extended').items()
tweets_list = [[tweet.created_at, tweet.id,
tweet.full_text.encode('utf-8'),
tweet.in_reply_to_status_id_str] for tweet in tweets]
tweets_df = pd.DataFrame(tweets_list,columns=['Datetime', 'Tweet Id', 'Text', 'Reply_ID'])
tweets_df2 = tweets_df[tweets_df['Reply_ID'] == tweet_id]
I'm using 'to:'+name
to find replies to a specific user and tweets_df['Reply_ID'] == tweet_id
to match the replies.我使用
'to:'+name
来查找对特定用户的回复,并使用tweets_df['Reply_ID'] == tweet_id
来匹配回复。 However, the result of the initial data frame tweets_df
before filtering the tweet ID only gives the reply tweets within a month.但是,过滤推文ID之前的初始数据帧
tweets_df
的结果仅给出一个月内的回复推文。
How can I get more replies starting from the 25-Jan?从 1 月 25 日开始,我怎样才能得到更多回复?
The legacy standard Twitter search API - which is what this Tweepy function is using - can only provide Tweets going back within the past 7 days.传统的标准 Twitter 搜索 API——这是这个 Tweepy 函数所使用的——只能提供过去 7 天内回溯的推文。 For a longer period, you need to use the premium 30-day or full-archive search APIs from Twitter.
对于更长的时间,您需要使用 Twitter 提供的高级 30 天或完整归档搜索 API。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.