DEV Community

Discussion on: Sentiment analysis on Trump's tweets using Python 🐍

Collapse
 
harshdarji23 profile image
Harsh Darji

How do we search by hashtag and not by username:
tweets = extractor.user_timeline(screen_name="realDonaldTrump", count=200)
I want to extract data which contains say #FIFA what are the changes I need to make?

Collapse
 
rodolfoferro profile image
Rodolfo Ferro

This will help:
docs.tweepy.org/en/v3.5.0/api.html...

And the code might look like this:

tweets = extactor.search(q='#FIFA', count=200)