“Ignorar certificación SSL” Código de respuesta

Ignorar certificación SSL

import urllib2
import ssl

ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

urllib2.urlopen("https://your-test-server.local", context=ctx)
Calm Crocodile

Ignorar certificación SSL

import urllib2, ssl

ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

opener = urllib2.build_opener(urllib2.HTTPSHandler(context=ctx), your_first_handler, your_second_handler[...])
opener.addheaders = [('Referer', 'http://example.org/blah.html')]

content = opener.open("https://localhost/").read()
Calm Crocodile

Ignorar certificación SSL

from urllib.request import urlopen
import ssl

response = urlopen('https://somedomain.co', context=ssl._create_unverified_context())
Calm Crocodile

Respuestas similares a “Ignorar certificación SSL”

Preguntas similares a “Ignorar certificación SSL”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código