🐛 ppn2ocr: Work around oai.sbb.berlin certificate problem

oai.sbb.berlin does not have a valid certificate:

% curl https://oai.sbb.berlin
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

Work around this by setting verify=False.
pull/27/head
Gerber, Mike 4 years ago
parent 4e19e2a655
commit f5b2eed8a6

@ -45,7 +45,9 @@ def oai_mets(ppn):
}
s = requests.Session()
r = s.get(API_URL, params=params)
# FIXME oai.sbb.berlin fails certificate check
#r = s.get(API_URL, params=params)
r = s.get(API_URL, params=params, verify=False)
mets = ET.XML(r.content).find(f".//{{{XMLNS['mets']}}}mets")
mets = ET.ElementTree(mets)

Loading…
Cancel
Save