carpentries-incubator / twitter-with-twarc

Introduction to Harvesting Twitter Data with Twarc
https://carpentries-incubator.github.io/twitter-with-twarc/
Other
4 stars 4 forks source link

ep 6: AND boolean not working #29

Closed kristi-sara closed 2 years ago

kristi-sara commented 2 years ago

Ran into error: ⚡ There were errors processing your request: Ambiguous use of and as a keyword. Use a space to logically join two clauses, or "and" to find occurrences of and in text (at position 19)

!twarc2 search --limit 500 "(#catsofinstagram #cute)" > hashtag_cats_500.jsonl

will do the AND

ameliameyer commented 2 years ago

I don't think that AND is an option for searches. I've only seen mentions of OR or the --combine-queries tag which does the same thing as OR.

update I just ran !twarc2 search --limit 500 "(#catsofinstagram #cute)" > hashtag_cats_500.jsonl, then the hashtag plugin and it returned 429 tweets that contain catsofinstagram and 423 that contain cute so I don't think it implements the AND operator.

kristi-sara commented 2 years ago

Yeah me thinks so too. I was looking through the twitter's documentation and they just said add a space to indicate an AND.

kristi-sara commented 2 years ago

Are we now sticking to ORs instead of a space to indicate AND?

ameliameyer commented 2 years ago

I think the 'AND' might be worth mentioning but we know that 'OR' works as intended so maybe we stick to that?

kristi-sara commented 2 years ago

kristi clarified the lesson for 6. closing.