我已经有了研究人员,开发人员访问Twitter,我需要执行的代码,这将计数每天的推文数量的关键字。我的代码如下:
import tweepy
from twitter_authentication import bearer_token
import time
import pandas as pd
name_data = pd.read_csv('name_data.csv', header='infer')
name_id_data = name_data[["business_id","business_name","date_rev"]]
client = tweepy.Client(bearer_token, wait_on_rate_limit=True)
count_tweets = []
for response in tweepy.Paginator(client.get_all_tweets_count,
query = 'Covax lang:en',
granularity = 'day',
start_time = '2021-01-20T00:00:00Z',
end_time = '2021-02-21T00:00:00Z',
pagination_token=None):
print(response)但是,问题是python给出了以下错误:
The query parameter [pagination_token] is not one of [query,start_time,end_time,since_id,until_id,next_token,granularity,search_count.fields]我也尝试使用tweepy.Cursor(),但是它声明这个方法不支持分页。会很感激你的帮助
发布于 2022-01-22 14:39:19
分页令牌不是get_all_tweets_count()方法的参数。
Client.get_all_tweets_count(query, *, end_time, granularity, next_token, since_id, start_time, until_id)```
Please remove that and and tryhttps://stackoverflow.com/questions/70808305
复制相似问题