From 8c600d6b4b0150bed85625404683b65658b2e701 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sun, 23 Feb 2025 23:08:47 -0500 Subject: [PATCH] [books] Fix no result for detail lookup --- vrobbler/apps/books/sources/semantic.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vrobbler/apps/books/sources/semantic.py b/vrobbler/apps/books/sources/semantic.py index 714fdf9..8c5098b 100644 --- a/vrobbler/apps/books/sources/semantic.py +++ b/vrobbler/apps/books/sources/semantic.py @@ -38,6 +38,9 @@ def lookup_paper_from_semantic(title: str) -> dict: result = json.loads(response.content) + if not result: + return paper_dict + page_str = result.get("journal", {}).get("pages") if page_str: try: