https://github.com/arudzinska/stackoverflow_golden_bot
Python bot to get the Fanatic badge
https://github.com/arudzinska/stackoverflow_golden_bot
Last synced: 4 months ago
JSON representation
Python bot to get the Fanatic badge
- Host: GitHub
- URL: https://github.com/arudzinska/stackoverflow_golden_bot
- Owner: arudzinska
- Created: 2018-12-11T11:01:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-01T23:07:05.000Z (almost 4 years ago)
- Last Synced: 2024-12-20T04:26:15.322Z (5 months ago)
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Get the Stack Overflow Fanatic badge with Golden Bot :trophy:
This bot will help you to get the golden badge on Stack Overflow... and hopefully teach you
something about Python!Golden Bot:
1) Visits Stack Overflow and logs in to your account.
2) Views your profile and check the visits' consecutive days counter.
3) Sends you an email with a report:
## Installation
Follow these steps on any Linux server.
If you're using AWS ec2 instance with the Amazon AMI image, you can run `installs_aws_ec2.sh` (with `sudo`) for steps 1 and 2. Run `source $HOME/.bash_profile` manually at the end!
1. Install the Chrome browser.
2. Install chromedriver (must be available in your `PATH`). Useful [tutorial for Linux](https://makandracards.com/makandra/29465-install-chromedriver-on-linux).
3. Install Python modules:``` sudo pip install -r requirements.txt```
4. Modify `config.json` with your credentials. Use a gmail account to send the email.
## Setup a cronjob
1. You can verify that the bot is working by running it directly with `python golden_bot.py` and
checking the specified receiver mailbox.
2. Setup a cronjob in your machine that will run the bot daily. Type `crontab -e` and add the following line at the end of the
file (will run the bot at 9am in the machine's timezone):```0 9 * * * source /home/ec2-user/.bash_profile && python /home/ec2-user/stackoverflow_golden_bot/golden_bot.py```
**NOTE:** Adjust the paths in the above line. `.bash_profile` (or other similar file) should contain all the
environmental variables.