Skip to content

Commit f9babc0

Browse files
committed
accept text/html
1 parent e0b7bc1 commit f9babc0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/bald/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,13 @@ def __getitem__(self, item):
235235
if not self.is_http_uri(item):
236236
raise ValueError('{} is not a HTTP URI.'.format(item))
237237
if item not in self.cache:
238-
headers = {'Accept': 'application/rdf+xml'}
239-
import datetime
240-
now = datetime.datetime.utcnow()
241-
print('\ndownloading: {}'.format(item))
238+
headers = {'Accept': 'application/rdf+xml, text/html'}
239+
# import datetime
240+
# now = datetime.datetime.utcnow()
241+
# print('\ndownloading: {}'.format(item))
242242
self.cache[item] = requests.get(item, headers=headers)
243-
then = datetime.datetime.utcnow()
244-
print('{}s'.format((then-now).total_seconds()))
243+
# then = datetime.datetime.utcnow()
244+
# print('{}s'.format((then-now).total_seconds()))
245245

246246
return self.cache[item]
247247

0 commit comments

Comments
 (0)