Closed simonw closed 5 years ago
Just importing tweets here isn't enough - how are we supposed to know which tweets were imported by which search?
So I think the right thing to do here is to also create a search_runs
table, which records each individual run of this tool (with a timestamp and the search terms used). Then have a search_runs_tweets
m2m table which shows which Tweets were found by that search.
I have a working command now. I'm going to ship it early because it could do with some other people trying it out.
It would be neat if this could support --since
, with that argument automatically finding the maximum tweet ID from a previous search that used the same exact arguments (using the search_runs
table).
I'm going to add a hash
column to search_runs
to support that. It's going to be the sha1 hash of the key-ordered JSON of the search arguments used by that run. Then --since
can look for an identical hash and use it to identify the highest last fetched tweet to use in since_id
.