mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-13 06:34:26 +00:00
Bugfix for empty search results from google
This commit is contained in:
parent
ba23ada1fe
commit
9c5970bbfc
@ -46,7 +46,7 @@ class Google(Metadata):
|
|||||||
tokens = [quote(t.encode("utf-8")) for t in title_tokens]
|
tokens = [quote(t.encode("utf-8")) for t in title_tokens]
|
||||||
query = "+".join(tokens)
|
query = "+".join(tokens)
|
||||||
results = requests.get(Google.SEARCH_URL + query)
|
results = requests.get(Google.SEARCH_URL + query)
|
||||||
for result in results.json()["items"]:
|
for result in results.json().get("items", []):
|
||||||
val.append(
|
val.append(
|
||||||
self._parse_search_result(
|
self._parse_search_result(
|
||||||
result=result, generic_cover=generic_cover, locale=locale
|
result=result, generic_cover=generic_cover, locale=locale
|
||||||
|
Loading…
Reference in New Issue
Block a user