0

How can I disable SSL certificate checking in urllib3?

My application uses urllib.request.Request:

request = urllib.request.Request(url, data=data, headers=headers)

but this function no longer supports the context parameter.

My python version is 3.7.3.

400 the Cat
  • 266
  • 3
  • 23

1 Answers1

1

You can disable SSL verification like this;

import urllib3
http = urllib3.PoolManager(cert_reqs='CERT_NONE')

And then use http as you like;

http.request("GET", "www.example.com")
doneforaiur
  • 1,308
  • 7
  • 14
  • 21