Jefferson-Henrique / GetOldTweets-python

A project written in Python to get old tweets, it bypass some limitations of Twitter Official API.
MIT License
1.34k stars 811 forks source link

How do you search multiple terms? #124

Open marcyshieh opened 6 years ago

marcyshieh commented 6 years ago

I was wondering how one could search multiple terms using the command-line tool. For example, I'd like to get tweets that mention either "european refugees" OR "computers", or even "european refugees" AND "france". How would I write this?

hemogre commented 6 years ago

https://twitter.com/search-advanced

Twitter allows you to do search but actually it translate only in one simple query Here some example I wrote somewhere else to show how it works

Few examples that gives the same result: Exact Query : Honda cars Normal Query : "Honda cars"

Any Query : Honda Toyota Normal Query : Honda OR Toyota

Exact Query: Honda stadium + Exclude Query : car Normal Query : "Honda stadium" -car

hashtag Search : DitchtheDrama Normal Search : #DitchtheDrama

You can add AND, OR and maybe some other stuff

marcyshieh commented 6 years ago

Thank you for the response! So the "Normal Query" parts of your examples are what I'd put in for the querysearch portion of this command?

python /Exporter.py --querysearch Honda OR Toyota --since 2016-01-01 --until 2016-12-31

bmjr commented 6 years ago

@marcyshieh to search for two terms with an OR it is exactly as you have said