twitter-dedupe
Python library to retweet unique links from noisy Twitter accounts.
My personal use case
Say you follow a news outlet that tweets the same link multiple times in a day, or a week. Maybe they provide different images or headlines, but it's the same story, over and over again.
I'd rather follow @{newsoutlet}-light and have a link show up there only once every 7 days or so.
How to use
- Set up a Twitter account, say @{newsoutlet}lite
- As @{newsoutlet}lite Follow @newsoutlet
- Get your Twitter Consumer Key, Consumer Key Secret, Access Key and Access Key Secret from http://dev.twitter.com
- Set up some environment variables
TWITTER_CONSUMER_KEY
TWITTER_CONSUMER_SECRET
TWITTER_ACCESS_TOKEN
TWITTER_ACCESS_TOKEN_SECRET
REDISTOGO_URL=redis://{user}:{pass}@{domain}:{port}
TWITTER_SCREEN_NAME={newsoutlet}lite
WAIT_INTERVAL=300 # Time to wait between polls, in seconds
LOG_LEVEL=WARN # Or INFO, OR DEBUG, etc.
- python bin/logonly.py
- Now you have a deamon running that'll examine @{newsoutlet}lites home timeline, and log any tweets it would retweet as @{newsoutlet}lite
- If you're happy quit bin/logonly.py
- Now run python bin/retweet.py