mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Google changed its search page markup again
This commit is contained in:
parent
d64362c939
commit
30e6bf5ff8
@ -20,7 +20,7 @@ from calibre import browser as _browser, prints, random_user_agent
|
||||
from calibre.utils.monotonic import monotonic
|
||||
from calibre.utils.random_ua import accept_header_for_ua
|
||||
|
||||
current_version = (1, 0, 9)
|
||||
current_version = (1, 0, 10)
|
||||
minimum_calibre_version = (2, 80, 0)
|
||||
|
||||
|
||||
@ -252,7 +252,7 @@ def google_parse_results(root, raw, log=prints):
|
||||
cache_url_map = google_extract_cache_urls(raw)
|
||||
# print('\n'.join(cache_url_map))
|
||||
ans = []
|
||||
for div in root.xpath('//*[@id="search"]//*[@id="rso"]//*[@class="kWxLod"]'):
|
||||
for div in root.xpath('//*[@id="search"]//*[@id="rso"]//*[@class="kWxLod" or @class="hlcw0c"]'):
|
||||
try:
|
||||
a = div.xpath('descendant::a[@href]')[0]
|
||||
except IndexError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user