From b86231a949c2c04999e831bc66ea09dbc4c1ccef Mon Sep 17 00:00:00 2001 From: Mazztok45 Date: Thu, 8 Feb 2024 11:26:59 +0100 Subject: [PATCH] refactoring getAsXMl to manage software --- src/zbmath_rest2oai/getAsXml.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zbmath_rest2oai/getAsXml.py b/src/zbmath_rest2oai/getAsXml.py index a6e3683..b9422e6 100644 --- a/src/zbmath_rest2oai/getAsXml.py +++ b/src/zbmath_rest2oai/getAsXml.py @@ -2,11 +2,11 @@ import requests -def final_xml2(de): +def final_xml2(de, api_source): headers = {'Accept': 'application/json'} - - r = requests.get('https://api.zbmath.org/v1/document/' + de, headers=headers) + api_source='https://api.zbmath.org/v1/document/' + r = requests.get(api_source + de, headers=headers) if r.status_code != 200: raise Exception(f"Unexpected response with status code {r.status_code}: {r.text}") json = r.json()