【发布时间】:2022-06-29 15:09:51
【问题描述】:
根据 Twitter API 文档,conversation_id 可用于获取线程。为此,应在推文搜索查询 (https://developer.twitter.com/en/docs/twitter-api/conversation-id) 中使用 conversation_id。 Twitter API 文档还说,conversation_id 应该在搜索推文查询中使用,如下所示:
我使用 tweepy 来获取类似这样的推文搜索结果,并且效果很好:
tweepy.Paginator(client.search_recent_tweets,
query = 'covid19 lang:cs OR corona lang:cs OR korona lang:cs OR covid lang:cs OR kovid lang:cs OR koronavirus lang:cs \
OR koronavir lang:cs OR coronavirus lang:cs',
但是,使用带有 conversation_id 的这段代码作为查询不起作用 - 有谁知道为什么会出现这种情况?
responses_from_conversations = []
for response in tweepy.Paginator(client.search_recent_tweets,
query = 'conversation_id:1494772850527457289',):
responses_from_conversations.append(response)
【问题讨论】:
标签: twitter tweepy twitterapi-python