This is a bot that replies with a summary of the book every time a Cosmere novel is mentioned
- Python 3
- pip for Python 3 (recommended)
- PRAW
- Install using pip3 by running
pip3 install praworsudo -H pip3 install prawif it requires escalated privileges.
- Install using pip3 by running
- Python Requests
- Install using pip3 by running
pip3 install requestsorsudo -H pip3 install requestsif it requires escalated privileges.
- Install using pip3 by running
- Beautiful Soup 4
- Install using pip3 by running
pip3 install beautifulsoup4orsudo -H pip3 install beautifulsoup4if it requires escalated privileges.
- Install using pip3 by running
- Create a Reddit account, and while logged in, navigate to preferences > apps
- Click on the are you a developer? create an app... button
- Fill in the details-
- name: Name of your bot/script
- Select the option 'script'
- decription: Put in a description of your bot/script
- redirect uri:
http://localhost:8080
- Click create app
- You will be given a
client_idand aclient_secret. Keep them confidential.
- Clone or download (and extract) this repository and navigate to it's directory
- Create a file named praw.ini with it's contents as:
[explainbot] username: reddit username password: reddit password client_id: client_id that you got client_secret: client_secret that you got - Create a blank text file named visited.txt inside the project directory
- In cosmere-explain-bot.py, replace the value of
pathwith the location of your visited.txt. - At a minimum, three files, namely cosmere-explain-bot.py, praw.ini and visited.txt are required for the bot to run.
- Type
python3 cosmere-explain-bot.pyin the Terminal to run the bot. - If the Reddit API returns an error due to too many requests, adjust
valin the instances oftime.sleep(val)in cosmere-explain-bot.py