@@ -4,23 +4,6 @@
|
|||||||
# Based on code from https://github.com/alfa-addon/
|
# Based on code from https://github.com/alfa-addon/
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Fix para error de validación del certificado del tipo:
|
|
||||||
# [downloadpage] Response code: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)>
|
|
||||||
# [downloadpage] Response error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
|
|
||||||
# Fix desde la página: https://stackoverflow.com/questions/27835619/urllib-and-ssl-certificate-verify-failed-error
|
|
||||||
# -----------------------------------------------------------------------
|
|
||||||
import ssl
|
|
||||||
try:
|
|
||||||
_create_unverified_https_context = ssl._create_unverified_context
|
|
||||||
except AttributeError:
|
|
||||||
# Legacy Python that doesn't verify HTTPS certificates by default
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
# Handle target environment that doesn't support HTTPS verification
|
|
||||||
ssl._create_default_https_context = _create_unverified_https_context
|
|
||||||
# -----------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import urllib.request as urllib
|
import urllib.request as urllib
|
||||||
import urllib.parse as urlparse
|
import urllib.parse as urlparse
|
||||||
|
|||||||
Reference in New Issue
Block a user