1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-26 01:50:31 +00:00

Bugfix for empty search results from google

This commit is contained in:
Ozzie Isaacs 2022-02-12 12:34:54 +01:00
parent ba23ada1fe
commit 9c5970bbfc

View File

@ -46,7 +46,7 @@ class Google(Metadata):
tokens = [quote(t.encode("utf-8")) for t in title_tokens]
query = "+".join(tokens)
results = requests.get(Google.SEARCH_URL + query)
for result in results.json()["items"]:
for result in results.json().get("items", []):
val.append(
self._parse_search_result(
result=result, generic_cover=generic_cover, locale=locale