From f5b2eed8a6b782c3a944f4edfb7afe8efe01984e Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Tue, 9 Jun 2020 11:19:25 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20ppn2ocr:=20Work=20around=20oai.s?= =?UTF-8?q?bb.berlin=20certificate=20problem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- ppn2ocr | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ppn2ocr b/ppn2ocr index c21e170..b26b462 100755 --- a/ppn2ocr +++ b/ppn2ocr @@ -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)