vladkens / twscrape

2024! X / Twitter API scrapper with authorization support. Allows you to scrape search results, User's profiles (followers/following), Tweets (favoriters/retweeters) and more.
https://pypi.org/project/twscrape/
MIT License
1.13k stars 132 forks source link

How to add terms in double quotes in the query for a search on exact phrase? (using Powershell on Windows) #120

Closed seinecle closed 7 months ago

seinecle commented 9 months ago

tried:

"'Las Vegas' lang:en -is:retweet" -> it works but Las and Vegas are not searched as an exact phrase

tried also:

 "`"Las Vegas`" lang:en -is:retweet -is:reply"
'"Las Vegas" lang:en -is:retweet -is:reply'
 """Las Vegas"" lang:en -is:retweet -is:reply"

And those three throw an error.

Any help is appreciated.

vladkens commented 9 months ago

Hi, @seinecle.

Just use it like:

twscrape search '"Las Vegas" lang:en -is:retweet -is:reply'

"word" used in X for exact text search. ' single quote to escape string in bash/powershell

Tested in PowerShell 7.4.0