Restrict by site since tbm doesnt work anymore

This commit is contained in:
Kovid Goyal 2025-04-19 05:50:16 +05:30
parent 377d51769b
commit 9e3a2c8be7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -202,7 +202,7 @@ def to_metadata(browser, log, entry_, timeout, running_a_test=False): # {{{
class GoogleBooks(Source):
name = 'Google'
version = (1, 1, 1)
version = (1, 1, 2)
minimum_calibre_version = (2, 80, 0)
description = _('Downloads metadata and covers from Google Books')
@ -433,7 +433,7 @@ class GoogleBooks(Source):
se = search_engines_module()
br = se.google_specialize_browser(se.browser())
if not has_google_id:
url = se.google_format_query(q, tbm='bks')
url = se.google_format_query(q, site='books.google.com')
log('Making query:', url)
r = []
root = se.query(br, url, 'google', timeout=timeout, save_raw=r.append)