Tweepy 搜索未产生与 twitter.com 搜索相同的结果

Tweepy search not yielding same results as twitter.com search

例如使用 Tweepy 搜索:

for match in tweepy.Cursor(api.search, q=('from:realdonaldtrump michaelcohen212'), include_entities=True, count=10, wait_on_rate_limit=True).items():
    print(match.text)

没有结果,但当我在这里搜索时,我得到了结果(尽管它们来自 2015 年):

https://twitter.com/search?f=tweets&q=from%3Arealdonaldtrump%20michaelcohen212&src=typd

我尝试使用 sinceuntil 等 Tweepy 搜索运算符针对该特定范围进行过滤,但它仍然没有产生任何结果

有什么想法吗?

这是因为搜索 API 的限制。

"The Twitter Search API searches against a sampling of recent Tweets published in the past 7 days."

https://developer.twitter.com/en/docs/tweets/search/overview/basic-search