https://github.com/pfitzer/twitterbot
Twitter Bot Docker Container
https://github.com/pfitzer/twitterbot
docker python tweepy twitter-bot twitterbot
Last synced: 5 months ago
JSON representation
Twitter Bot Docker Container
- Host: GitHub
- URL: https://github.com/pfitzer/twitterbot
- Owner: pfitzer
- License: mit
- Created: 2019-07-28T12:05:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-19T12:55:53.000Z (almost 2 years ago)
- Last Synced: 2023-10-19T13:46:52.442Z (almost 2 years ago)
- Topics: docker, python, tweepy, twitter-bot, twitterbot
- Language: Python
- Homepage: https://hub.docker.com/r/pfitzer/twitterbot
- Size: 36.1 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Docker Twitterbot
[
](https://github.com/pfitzer/TwitterBot/actions?query=workflow%3A%22Create+Release%22)
[](https://hub.docker.com/r/pfitzer/twitterbot)
[](https://pyup.io/account/repos/github/pfitzer/TwitterBot/)
[](https://pyup.io/account/repos/github/pfitzer/TwitterBot/)
##### automated retweeting
### How to use?
First, you need to create an app on [twitter](https://developer.twitter.com/en/apps)
Then create a .env file with the following content and add the data you got from twitter.
And change STOP_WORDS and HASHTAGS to fit your needs.## Twitter Api
CONSUMER_KEY=YOUR_CONSUMER_KEY
CONSUMER_SECRET=YOUR_CONSUMER_SECRET
ACCESS_TOKEN=YOUR_ACCESS_TOKEN
ACCESS_TOKEN_SECRET=YOUR_TOEK_SECRET## Bot
# a comma seperated list of stop words
# tweets containing one of these words won`t be retweeted
STOP_WORDS=a,list,of,stopwords# a comma seperated list of favorite hashtags
HASHTAGS=#we,#love,#twitter
# a list of preferred languages
TWITTER_LANG=en,de### The container
# pull the container
docker pull pfitzer/twitterbot
# and run it
docker run -d --env-file .env --restart always pfitzer/twitterbot
### Build from scratch
git clone https://github.com/pfitzer/TwitterBot.git
cd TwitterBot
docker build . -t twitterbot
### Enhanced functionalityThere are two more python files under the bots directory
* autoreply.py is for auto reply to messages
* followfollowers.py is for automatic re-followTo use these functions, add them as CMD to the dockerfile and build the image from scratch.
### Prerequisites* Python 3.8
* Tweepy