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

Consume streaming tweets from Twitter #9

Closed
8 tasks done
keithamoss opened this issue Jul 11, 2018 · 0 comments
Closed
8 tasks done

Consume streaming tweets from Twitter #9

keithamoss opened this issue Jul 11, 2018 · 0 comments
Assignees

Comments

@keithamoss
Copy link
Owner

keithamoss commented Jul 11, 2018

Tweepy looks good.

We'll need to handle:

  • Disconnecting if we get a 402 (too many connection attempts in a short period of time) and somehow alerting us.
  • Store the Twitter API authorization tokens in the database.
  • Automatically starting a stream if there's an election on (so that we can restart the app and have things Just Work).
  • Stopping an old stream if a new one has just connected. Or, not starting a new stream until the old one has disconnected).
  • A means to start/stop streaming.
  • Not writing duplicate tweets (if two apps are running at once).
  • Tweet compliance
  • Fill in gaps

Required database tables:

  • A table to hold credentials
  • A table to hold the uuid of the current 'master' application (used for CD and start/stop)
  • A table to hold any errors (clearable by admins) or logs (e.g. LIMIT notices)
  • A table to hold tweets

Documentation:
Streaming With Tweepy
Consuming streaming data
Streaming message types
Filter realtime Tweets
Standard streaming API request parameters

Some potentially useful results for the future:
Twitter Stream re-connect best practices (For python-twitter, not Tweepy - but the principles are the same.)
Tweepy. Make stream run forever
Twitter Streaming API limits?

@keithamoss keithamoss self-assigned this Jul 11, 2018
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

No branches or pull requests

1 participant