TL;DR: _ssl_url
doesn't work in PRAW 4. Use a custom Requests session with Session.verify
.
For PRAW 4 or later:
According to PRAW's developer, the option to use config._ssl_url = None
was removed in PRAW 4. Instead, you can use a custom Requests Session to configure your own SSL settings.
Assuming you are on a company network with self-signed certificates, you have two options.
Option 1 - Trusting a Self-Signed Certificate
First, export your company's root certificate as a .pem
file. (See Export a PEM-Format Certificate From a Windows System)
Next, create a Requests session and specify a path directly to your certificate file.
import praw
import requests
session = requests.Session()
session.verify = '/path/to/certfile.pem' # Path to cert file
reddit = praw.Reddit(client_id='###',
client_secret='###',
user_agent='windows:testapp (by /u/stevoisiak)',
requestor_kwargs={'session': session})
Option 2 - Disabling SSL Verification (insecure)
This method will fully disable HTTPS verification for all requests. While this method is simple, it is strongly discouraged for security reasons. (See SSL Warnings)
import praw
import requests
session = requests.Session()
session.verify = False # Disable SSL
reddit = praw.Reddit(client_id='###',
client_secret='###',
user_agent='windows:testapp (by /u/stevoisiak)',
requestor_kwargs={'session': session})
See Also