Comments (1)
Sure thing - the twarc2 search
command only takes a single query, not a text file as input. for that you need searches
:
twarc2 searches --limit 10000 --start-time 2020-03-16 --end-time 2021-01-08 --archive input.txt output.jsonl
The input text file input.txt
is 1 separate search query per line, but they will all be written to the same output file, output.jsonl
in this case. You can combine them with OR
with the flag --combine-queries
, sometimes this speeds things up, but usually it's not necessary.
I will note that the progress bar becomes less responsive in this way, so it may look like twarc isn't working but it is. This is still an open issue #561 same thing there applies to searches command, and all bulk commands.
To get your search in the text file to work, put it all on one line, so:
(example OR examples OR #idea1 OR #idea2 OR #idea3 OR #idea4) -is:retweet lang:en
And add parentheses around OR clauses.
If those were meant to be separate queries, you have to add the operators to every line, so if you wanted:
(example OR examples) -is:retweet lang:en
(#idea1 OR #idea2 OR #idea3 OR #idea4) -is:retweet lang:en
Hope that helps! See https://developer.twitter.com/en/docs/twitter-api/tweets/search/integrate/build-a-query on building queries in general.
from twarc.
Related Issues (20)
- How to use Academic API to search archives with language filters? HOT 2
- How to extract the author user name of a retweet? HOT 1
- Twarc API V2 function to get conversations HOT 1
- Is it possible to use "next_token"? HOT 3
- Missing `variants` field in `media.fields`
- Add `include_ext_is_blue_verified=True`
- CLI: Allow to differentiate between 404 and connection timeout HOT 4
- Have twarc2 400 error while searching phrases. HOT 1
- CLI Errors fail to show for invalid input file
- CLI Errors fail to show for invalid input file HOT 1
- twarc2 timeline --no-context-annotations not pulling 500 tweets HOT 2
- Is it possible to convert twarc jsnol files to twarc2 jsonl files? HOT 2
- Impossible to specify No expansions at all in CLI.
- Implement new compliance Streams
- Cannot find user_verified_type in the tweet metadata HOT 18
- twarc2 hydrate HOT 2
- twarc2 hydrate freezes at 20% HOT 3
- Client forbidden HOT 3
- Forbidden error after few tweets hydrated (403) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twarc.