Commit fb427181 authored by Daniel W Bond's avatar Daniel W Bond

ye olde fixes still laying around

parents 20c4edc6 5fcda06c
# Archival Warning
WARNING: This project is abandoned. As such, we cannot garauntee functionality or the security of the project. Please contact srct@gmu.edu to either take up this project or for questions regarding it.
# SRCT Bookshare
SRCT Bookshare is a platform for GMU students to buy and sell their textbooks.
......
......@@ -14,10 +14,12 @@ SRCT Bookshare • Charts
{% cache 600 ChartsNotToolbar %}
<div class="row">
<div class="col-lg-12 text-center">
<h1><strong>SRCT</strong>BOOKSHARE</h1>
<p class="lead"><strong>Listing Charts</strong></p>
<div class="page-header" id="banner">
<div class="row">
<div class="col-lg-12 text-center">
<h1><strong>SRCT</strong>&#8203;BOOKSHARE</h1>
<p class="lead"><strong>Listing Charts</strong></p>
</div>
</div>
</div>
......
......@@ -31,7 +31,13 @@ def ISBNMetadata(standardISBN):
url = "http://xisbn.worldcat.org/webservices/xid/isbn/" +\
str(standardISBN) +\
"?method=getMetadata&format=json&fl=title,year,author,ed"
metadata = requests.get(url)
# In case the API fails to return, simply return None.
try:
metadata = requests.get(url, timeout=3)
except ConnectionError:
return None
# format into a dictionary
dejson = metadata.json()
try:
......
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