Commit 773c6517 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

Merge branch 'jrouly/bookshare-master'

parents b92a75e6 c283d6ce
......@@ -17,7 +17,7 @@ SRCT Bookshare • Charts
<div class="page-header" id="banner">
<div class="row">
<div class="col-lg-12 text-center">
<p class="lead"><strong>Listing Charts</strong></p>
......@@ -31,7 +31,13 @@ def ISBNMetadata(standardISBN):
url = "" +\
str(standardISBN) +\
metadata = requests.get(url)
# In case the API fails to return, simply return None.
metadata = requests.get(url, timeout=3)
except ConnectionError:
return None
# format into a dictionary
dejson = metadata.json()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment