从特定用户那里获取有关某些项目的推文

Get tweets about certain items from a specific user

所以我想获取特定用户谈论某个项目或包含该项目的历史推文我尝试了这段代码,但它总是给我 0 条推文,但我确定该用户已经发布了关于该项目的推文

tweetCount = 0
item='trump'
with  open('historicalTweetsAboutItem.txt','w') as f:
    for status in tweepy.Cursor(api.user_timeline, screen_name='userScreenName', tweet_mode="extended").items():
        tweet=  status.full_text.encode('utf-8')        
        print(tweet)
        if item in tweet:
            f.write(tweet+ "\n")
            tweetCount += 1
print("Downloaded {0} tweets".format(tweetCount))
f.close()

有人可以给我一个更简单的方法来获得我想要的吗:)

关于大和小

if item.upper() in tweet.upper():