fix the client api

This commit is contained in:
Christine Dodrill 2015-08-09 15:59:57 -07:00
parent 23404b7ac6
commit 614fcf2990
1 changed files with 5 additions and 2 deletions

View File

@ -51,7 +51,10 @@ def _base_get(endpoint, *fragments):
if r.status_code != 200:
raise Exception("Not found or server error")
return r.json()
try:
return r.json()["episodes"]
except:
return r.json()["episode"]
return doer
@ -78,4 +81,4 @@ def search(query):
if r.status_code != 200:
raise Exception("Not found or server error")
return r.json()
return r.json()["episodes"]