Check that search result urls startwith https://books.google

Dont trust google web search to always return google books results
This commit is contained in:
Kovid Goyal 2022-07-28 21:26:25 +05:30
parent 21bb0ce833
commit 3f550d5382
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -411,7 +411,7 @@ class GoogleBooks(Source):
google_ids = [] google_ids = []
for q in se.google_parse_results(root, r[0], log=log, ignore_uncached=False): for q in se.google_parse_results(root, r[0], log=log, ignore_uncached=False):
m = pat.search(q.url) m = pat.search(q.url)
if m is None: if m is None or not q.url.startswith('https://books.google'):
continue continue
google_ids.append(m.group(1)) google_ids.append(m.group(1))