From 8658e36ca8b43ca1a0bb8edb3d983885f32b2534 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Tue, 16 Nov 2021 20:40:22 +1100 Subject: [PATCH] code formatting --- bookwyrm/utils/isni.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bookwyrm/utils/isni.py b/bookwyrm/utils/isni.py index acd49210b..7ed01e0e5 100644 --- a/bookwyrm/utils/isni.py +++ b/bookwyrm/utils/isni.py @@ -2,19 +2,20 @@ import xml.etree.ElementTree as ET import requests + def request_isni_data(search_index, search_term, max_records=5): """Request data from the ISNI API""" search_string = f'{search_index}="{search_term}"' query_params = { - "query" : search_string, - "version" : "1.1", - "operation" : "searchRetrieve", - "recordSchema" : "isni-b", - "maximumRecords" : max_records, - "startRecord" : "1", - "recordPacking" : "xml", - "sortKeys" : "RLV,pica,0,," + "query": search_string, + "version": "1.1", + "operation": "searchRetrieve", + "recordSchema": "isni-b", + "maximumRecords": max_records, + "startRecord": "1", + "recordPacking": "xml", + "sortKeys": "RLV,pica,0,,", } result = requests.get("http://isni.oclc.org/sru/", params=query_params) # the OCLC ISNI server asserts the payload is encoded