SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 41137ffa authored by Boris Ponsioen's avatar Boris Ponsioen
Browse files

Readds error handling in get_crossref_test temporarily

parent 728b537d
No related branches found
No related tags found
No related merge requests found
...@@ -28,13 +28,13 @@ def get_crossref_test(cursor='*'): ...@@ -28,13 +28,13 @@ def get_crossref_test(cursor='*'):
print("Last cursor: ", last_cursor) print("Last cursor: ", last_cursor)
print("Current cursor: ", cursor) print("Current cursor: ", cursor)
params = {'cursor': cursor, 'rows': rows, 'mailto': 'b.g.t.ponsioen@uva.nl'}
last_cursor = cursor
for j in range(0,2): for j in range(0,2):
params = {'cursor': cursor, 'rows': rows, 'mailto': 'b.g.t.ponsioen@uva.nl'}
r = requests.get(url, params=params) r = requests.get(url, params=params)
r_json = r.json() r_json = r.json()
citables_json = r_json['message']['items'] citables_json = r_json['message']['items']
last_cursor = cursor
cursor = r_json['message']['next-cursor'] cursor = r_json['message']['next-cursor']
number_of_results = len(r_json['message']['items']) number_of_results = len(r_json['message']['items'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment