-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add prototype TwitterBatchScraper #202
base: master
Are you sure you want to change the base?
Conversation
|
||
exports.TweetCache = class TweetCache | ||
constructor : () -> | ||
@tweets = new Map() # username -> tweet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad idea, should keep multiple tweets per twitter user and pick the correct one for given hunt
src/scrapers/twitter_batch.iced
Outdated
@log "| search index #{u} -> #{rc}" | ||
if rc isnt v_codes.OK then #noop | ||
else if not json? or (json.length is 0) then rc = v_codes.EMPTY_JSON | ||
else if not json.data? then rc = v_codes.INVALID_JSON |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not invalid json, data
is not present when there are no results
expansions: "author_screen_name" | ||
"user.fields": "url,username" | ||
"tweet.fields": "created_at" | ||
max_results: 60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be problematic during initial run if there were more than new 60 proofs last week.
No description provided.