From 7415b11f7846655d12c7b396b1e8b0b0cb3d53d1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 23 Jul 2022 14:34:27 -0400 Subject: [PATCH] robust googlebooks search --- common/searcher.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/searcher.py b/common/searcher.py index e4523770..48c43af9 100644 --- a/common/searcher.py +++ b/common/searcher.py @@ -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']: