Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lurst/mylittlebotie
:robot:The simplest possible twitter bot
https://github.com/lurst/mylittlebotie
bot microcode python twitter
Last synced: about 2 months ago
JSON representation
:robot:The simplest possible twitter bot
- Host: GitHub
- URL: https://github.com/lurst/mylittlebotie
- Owner: LuRsT
- License: mit
- Created: 2017-07-11T13:46:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-04T15:33:35.000Z (almost 7 years ago)
- Last Synced: 2024-10-13T11:41:26.012Z (3 months ago)
- Topics: bot, microcode, python, twitter
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mylittlebotie
The simplest possible twitter bot.
It twittes a random Wikipedia page every time you run the script.
Example of this script in use: https://twitter.com/mylittlebotie
## How to use?
- Create a twitter account
- Add an app
- Add access token to app
- Fill in necessary environment variables:
- TWITTER_CONSUMER_KEY
- TWITTER_CONSUMER_SECRET
- TWITTER_ACCESS_TOKEN
- TWITTER_ACCESS_TOKEN_SECRET
- Create a virtual environment (Optional)
- Install requirements
- `pip install -r requirements.txt`
- Run it: `python main.py`
- Check twitter account## How to make it bot-like
Add this line to your crontab:
0 * * * * python main.py
Note: You need to pass the env vars somehow to the environment runing the
script.## Known issues
- The client raises an exception if we send the same status update, which with
the current implementation will happen very quickly.## Tips and tricks
To easily run the script without having to set the twitter keys all the time,
you can create a `keys.sh` file which will store them (this is NOT safe!) and
then you run `source keys.sh` and now you can run `python main.py` without an
issue.Example `keys.sh` file:
export TWITTER_CONSUMER_KEY=""
export TWITTER_CONSUMER_SECRET=""
export TWITTER_ACCESS_TOKEN=""
export TWITTER_ACCESS_TOKEN_SECRET=""Note: `keys.sh` is already in `.gitignore`