Skip to content

Commit 6af5976

Browse files
author
xiffy
committed
httpS waar mogelijk
1 parent e766eb7 commit 6af5976

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kb/nl/api/sru.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from kb.nl.collections import SETS
1212
from kb.nl.helpers import etree
1313

14-
SRU_BASEURL = 'http://jsru.kb.nl/sru/sru'
14+
SRU_BASEURL = 'https://jsru.kb.nl/sru/sru'
1515
SRU_BASEURL += '?version=1.2&maximumRecords=%i'
1616
SRU_BASEURL += '&operation=searchRetrieve'
1717
SRU_BASEURL += '&startRecord=%i'
@@ -37,7 +37,7 @@ def records(self):
3737
# TODO: distinguish by xsi:type
3838
@property
3939
def identifiers(self):
40-
baseurl = 'http://resolver.kb.nl/resolve?urn='
40+
baseurl = 'https://resolver.kb.nl/resolve?urn='
4141
result = [r.text.replace(baseurl, '') for r in self.record_data.iter() if
4242
r.tag.endswith('identifier') and r.text.find(':') > -1]
4343
return result
@@ -124,7 +124,7 @@ def next(self):
124124

125125

126126
class sru():
127-
DEBUG = False
127+
DEBUG = True
128128

129129
collection = False
130130
maximumrecords = 50
@@ -170,7 +170,7 @@ def run_query(self):
170170
url = SRU_BASEURL % (self.maximumrecords, self.startrecord,
171171
self.recordschema, self.collection, self.query)
172172
if self.DEBUG:
173-
sys.stdout.write(url)
173+
print("run_query: %s" % url)
174174

175175
r = requests.get(url)
176176

0 commit comments

Comments
 (0)