Retweet unique links from noisy Twitter accounts.
10K+
Python library to retweet unique links from noisy Twitter accounts.
This is a fork of cmheisel/twitter-dedupe with minimal changes to update for Python 3 and with updated dependencies.
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.
TWITTER_CONSUMER_KEY
TWITTER_CONSUMER_SECRET
TWITTER_ACCESS_TOKEN
TWITTER_ACCESS_TOKEN_SECRET
# Only one of Redis/DynamoDB is needed. Redis will take precedence.
REDISTOGO_URL=redis://{user}:{pass}@{domain}:{port}
DYNAMODB_TABLE_NAME={some_table_name} # see notes below
TWITTER_SCREEN_NAME={newsoutlet}lite
WAIT_INTERVAL=300 # Time to wait between polls, in seconds
LOG_LEVEL=WARN # Or INFO, OR DEBUG, etc.
The table you specify must already exist. It must have a string partition key named "key". Optionally, you should set "expires" as the field for TTL (time to live) support so that unused cache items are deleted.
For example, you can create a table with:
aws dynamodb create-table \
--table-name {some_table_name} \
--attribute-definitions AttributeName=key,AttributeType=S \
--key-schema AttributeName=key,KeyType=HASH
And enable TTL with:
aws dynamodb update-time-to-live \
--table-name {some_table_name} \
--time-to-live-specification \
AttributeName=expires,Enabled=true
Content type
Image
Digest
sha256:650bda38a…
Size
347.2 MB
Last updated
over 3 years ago
docker pull jonoh/twitter-dedupe