Niche millennial content aggregation (i.e., make a basic Twitter bot)
- Python3
- tweepy
- requests
- pyyaml
This code depends on you having set up access to the Twitter Public API, so do that first (look up twurl for some instructions). I'm going to use the default .twurlrc setup for a credentials file. If you already have a .twurlrc, it should work. Otherwise, create one. It should look like this:
---
configuration:
default_profile:
- < your screen name >
- < CONSUMER KEY >
profiles:
< your screen name >:
< CONSUMER KEY >:
username: < your screen name >
token: < TOKEN >
secret: < SECRET >
consumer_secret: < CONSUMER SECRET >
consumer_key: < CONSUMER KEY >
You'll also need access to the Google Civic Information API. Information on that is here: https://developers.google.com/civic-information/
After that access is set up, you shouldn't have to change anything else.
Run python get_representatives_bot.py
and @-mention your bot (from a different account!) to try it out.