mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 19:25:09 +01:00
Fix google search not working because of change in website markup
This commit is contained in:
parent
2a66dfead0
commit
7c8672f2ee
1 changed files with 2 additions and 2 deletions
|
|
@ -20,7 +20,7 @@
|
|||
from calibre.utils.monotonic import monotonic
|
||||
from calibre.utils.random_ua import accept_header_for_ua
|
||||
|
||||
current_version = (1, 0, 4)
|
||||
current_version = (1, 0, 5)
|
||||
minimum_calibre_version = (2, 80, 0)
|
||||
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ def google_search(terms, site=None, br=None, log=prints, safe_search=False, dump
|
|||
ans = []
|
||||
for div in root.xpath('//*[@id="search"]//*[@id="rso"]//*[@class="g"]'):
|
||||
try:
|
||||
a = div.xpath('descendant::div[@class="r"]/a[@href]')[0]
|
||||
a = div.xpath('descendant::div[@class="rc"]//a[@href]')[0]
|
||||
except IndexError:
|
||||
log('Ignoring div with no descendant')
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in a new issue