mirror of
https://github.com/gsi-upm/sitc
synced 2025-12-15 09:38:16 +00:00
Minor changes LOD 01 and 03
This commit is contained in:
@@ -12,6 +12,7 @@ from urllib.request import Request, urlopen
|
||||
from urllib.parse import quote_plus, urlencode
|
||||
from urllib.error import HTTPError
|
||||
|
||||
import ssl
|
||||
import json
|
||||
import sys
|
||||
|
||||
@@ -32,7 +33,11 @@ def send_query(query, endpoint):
|
||||
headers={'content-type': 'application/x-www-form-urlencoded',
|
||||
'accept': FORMATS},
|
||||
method='POST')
|
||||
res = urlopen(r)
|
||||
context = ssl.create_default_context()
|
||||
context.check_hostname = False
|
||||
context.verify_mode = ssl.CERT_NONE
|
||||
|
||||
res = urlopen(r, context=context)
|
||||
data = res.read().decode('utf-8')
|
||||
if res.getcode() == 200:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user