Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

michalz-zoom
Copy link
Member

No description provided.


exports.TweetCache = class TweetCache
constructor : () ->
@tweets = new Map() # username -> tweet
Copy link
Member Author

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

@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
Copy link
Member Author

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
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant