python-scraping icon indicating copy to clipboard operation
python-scraping copied to clipboard

[SSL: CERTIFICATE_VERIFY_FAILED] on example site

Open erischon opened this issue 3 years ago • 3 comments

Hi,

I can't anymore use the example site.

urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)>

Can you renewal the certificate ? ;)

Thx,


To bypass the problem I use requests not urlllib :

  • requests.get("url", verify=False) instead of urlopen()
  • BeautifulSoup(html.content, 'html.parser') instead of BeautifulSoup(html.read(), 'html.parser')

erischon avatar Dec 18 '21 10:12 erischon

我已收到您的邮件,谢谢!

JosephWhang avatar Dec 18 '21 10:12 JosephWhang

@erischon Hi -- thanks for the heads up! Re-issued the certificate and tested, looks good now :)

REMitchell avatar Dec 18 '21 19:12 REMitchell

Hi Ryan,

The Chapter 4 scripts don't work for me unless I import ssl and create unverified context. Can you help with why this is happening?

gitchegumee11 avatar Apr 15 '24 19:04 gitchegumee11