naren_paste

SSLCertVerificationError

Jun 7th, 2024
497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | Source Code | 0 0
  1. import ssl
  2. import urllib.request
  3.  
  4. # Create an SSL context that does not verify certificates
  5. context = ssl._create_unverified_context()
  6.  
  7. # Use this context with urlopen
  8. flipkart_url = "https://www.flipkart.com"
  9. response = urllib.request.urlopen(flipkart_url, context=context)
  10. html = response.read()
  11.  
  12. print(html)
  13.  
Advertisement
Add Comment
Please, Sign In to add comment