I want to get data from api.covid19api.com The following code did work some time ago:
conn = http.client.HTTPSConnection("api.covid19api.com")
payload = ''
headers = {}
conn.request("GET", "/countries", payload, headers)
res = conn.getresponse()
data = res.read().decode('UTF-8')
existingCountries = json.loads(data)
existingCountries
dfC=pd.DataFrame(existingCountries)
dfC.head()
However, today I get the follwing error message:
SSLCertVerificationError Traceback (most recent call last) in ----> 4 conn.request("GET", "/countries", payload, headers) ... SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)
Can you help me, please?