From 2f4fae7d02fbd29d653afc9f2e9bd09393a8e83f Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Mon, 20 Oct 2025 16:12:01 -0400 Subject: [PATCH] [books] Short circut google lookup if it fails --- vrobbler/apps/books/sources/google.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vrobbler/apps/books/sources/google.py b/vrobbler/apps/books/sources/google.py index ae25ca1..2d7b87c 100644 --- a/vrobbler/apps/books/sources/google.py +++ b/vrobbler/apps/books/sources/google.py @@ -29,6 +29,9 @@ def lookup_book_from_google(title: str) -> dict: google_result = ( json.loads(response.content).get("items", [{}])[0].get("volumeInfo") ) + if not google_result: + return {} + publish_date = pendulum.parse(google_result.get("publishedDate")) isbn_13 = ""