JustAnotherArchivist / snscrape

A social networking service scraper in Python
GNU General Public License v3.0
4.33k stars 699 forks source link

Scrape Tweets with multiple keywords #168

Closed mahsaazizi closed 3 years ago

mahsaazizi commented 3 years ago

Hi there! I wonder if we can extract tweets from Twitter by more than one keyword. For example, I need all the tweets having the two words of 'COVID' and 'Cancer'. It is doable using snscrape?

JustAnotherArchivist commented 3 years ago

Yes, simply pass multiple keywords separated with a space in the argument to the twitter-search scraper. For example, in a POSIX shell: snscrape twitter-search 'foo bar'