Browse Source

[books] Fix no result for detail lookup

Colin Powell 2 months ago
parent
commit
8c600d6b4b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      vrobbler/apps/books/sources/semantic.py

+ 3 - 0
vrobbler/apps/books/sources/semantic.py

@@ -38,6 +38,9 @@ def lookup_paper_from_semantic(title: str) -> dict:
 
 
     result = json.loads(response.content)
     result = json.loads(response.content)
 
 
+    if not result:
+        return paper_dict
+
     page_str = result.get("journal", {}).get("pages")
     page_str = result.get("journal", {}).get("pages")
     if page_str:
     if page_str:
         try:
         try: