I would like to search for multiple words using the Twint Python Library. However, I can only find guidance on searching for one word within tweets. So, for example, "twint -s "pregnant" --since "2020-03-01 13:13:59" -o "sample.csv" --csv" gathers tweets that contain the word pregnant. When I add ...-s "pregnant -s "COVID," the code runs, but gathers tweets containing the word pregnant or COVID. How do I search for multiple words? Even better would be the ability to search multiple words using and/or.
Asked
Active
Viewed 3,481 times
2 Answers
1
Take a look at this issue on Twint page on Github link. Also, this link may be helpful.
According to the explanations in the above link from the 3 samples below:
Sample 1: "king a none burger"
Sample 2: "king a none"
Sample 3: "burger king none"
twint -s "king burger"
gathers sample 1 and 3
twint -s "king OR burger"
gathers sample 1, 2, and 3
twint -s "\"burger king\""
gathers just sample 3

pouria babvey
- 145
- 2
- 12