User:PokestarFan/Ultimate PRAW Guide/Setting Up PRAW
PRAW setup takes a bit of time.
- Python 3 (This guide uses Python 3 and it is recommended as it is the latest version)
- A Reddit Account
- Free Disk Space
- An Internet Connection
Step 1: Download PRAW
Open up your terminal, and run the following command:
pip install praw
Wait for it to finish.
Step 2: Creating an auth code
In there, you should see the "Create an app" button. If you do not, scroll down until you see it.
Click on the button, and do the following.
- In the name box, type in anything.
- Select the "script" option.
- Type in
http://127.0.0.1:65010/authorize_callbackas the redirect url.
- Click create app
You should now have a box with various different text.
Step 3: Login to Reddit
Open up the python interpreter or a text editor, and type in the following code:
import praw u = '' p = '' c_id = '' c_sec = '' reddit = praw.Reddit(username=u, password=p, client_id=c_id, client_secret=c_sec, user_agent='Praw Tutorial')
Make sure to put in text in the following variables. In
u = '', replace
'username', where username is your Reddit username. Do the same for the password (p), client_id (c_id), and the client_secret (c_sec).
The client id can be found below the text "personal use script" in the box from step 2. The client secret is the text after the word "secret".