fix uchile

pull/94/head
eric 2020-10-02 14:24:09 -04:00
parent 21cf79e382
commit 240b825f8a
1 changed files with 3 additions and 1 deletions

View File

@ -803,7 +803,9 @@ def harvest_libroschile(ebook):
json = requests.get(jsonurl).json()
if not json:
return None, 0
filename = json['downloads']['url']
filename = json.get('downloads',{}).get('url', None)
if not filename:
return None, 0
pdfurl = LIBRODPDF % (booknum, filename, guid)
return make_dl_ebook(pdfurl, ebook)