robust googlebooks search

This commit is contained in:
Your Name 2022-07-23 14:34:27 -04:00
parent 5a34198363
commit 7415b11f78

View file

@ -92,6 +92,8 @@ class GoogleBooks:
j = requests.get(api_url).json()
if 'items' in j:
for b in j['items']:
if 'title' not in b['volumeInfo']:
continue
title = b['volumeInfo']['title']
subtitle = ''
if 'publishedDate' in b['volumeInfo']: