I got this error while playing around with Python

raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.imdb.com', port=443): Max retries exceeded with url: /chart/tvmeter?sort=ir,desc&mohttps://www.imdb.com/chart
/tvmeter?sort=ir,desc&mode=simple&page=1de=simple&page=1 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: sel
f signed certificate in certificate chain (_ssl.c:1129)')))

change 

raw_html = requests.get(imdb_url)

to 

raw_html = requests.get(imdb_url, verify=False)

Please note that this will cause the certificate not to be verified. This will expose your application to security risks, such as man-in-the-middle attacks.

 

Saved you some valuable time?

Buy me a drink 🍺 to keep me motivated to create free content like this!