medialab / minet

A webmining CLI tool & library for python.
GNU General Public License v3.0
286 stars 26 forks source link

Twitter search query cannot use double quotes #990

Closed Tyrannas closed 1 week ago

Tyrannas commented 1 week ago

When performing a twitter query, it's possible to search for specific expression using double quotes (and double quotes only) for instance: "be like" OR "être comme"

However, when using the minet twitter scrape command, query must be surrounded by double quotes and double quotes only, so it's not possible to write: '"be like" OR "être comme"' this will raise the following error: minet: error: unrecognized arguments: OR être comme'

This goes the same way with backquotes.

Yomguithereal commented 1 week ago

However, when using the minet twitter scrape command, query must be surrounded by double quotes and double quotes only, so it's not possible to write:

Why? Most shell also accepts single quotes (they often have simpler semantics than double quotes regarding interpolation). In my shell the following commands works fine:

minet tw scrape tweets '"be like" OR "être comme"'

Are you working in a Windows shell?

Tyrannas commented 1 week ago

Just tried in a git bash and it's indeed working. I had the problem on windows command prompt indeed ! Not sure it's an issue with minet then so I guess it can be closed

Yomguithereal commented 1 week ago

I tried to find how to escape double quotes in the windows command prompt and it looks like a hellscape: https://stackoverflow.com/questions/7760545/escape-double-quotes-in-parameter :)