diff options
author | Émilien Devos <contact@emiliendevos.be> | 2022-01-17 21:49:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-17 21:49:57 +0000 |
commit | 6670063e0d2930bc40a7936829070ffc199e4a8d (patch) | |
tree | 1e785b460c297dfeda6d60cceff9d1f96388f546 /searx | |
parent | 96ab5e57ff92aba4ab0fedeb4e5fbfa09e9fc2e2 (diff) | |
download | searxng-6670063e0d2930bc40a7936829070ffc199e4a8d.tar.gz searxng-6670063e0d2930bc40a7936829070ffc199e4a8d.zip |
Update XPath for Google engine
Diffstat (limited to 'searx')
-rw-r--r-- | searx/engines/google.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/searx/engines/google.py b/searx/engines/google.py index ed4381f47..5ee00cca3 100644 --- a/searx/engines/google.py +++ b/searx/engines/google.py @@ -111,8 +111,8 @@ filter_mapping = {0: 'off', 1: 'medium', 2: 'high'} # specific xpath variables # ------------------------ -# google results are grouped into <div class="g" ../> -results_xpath = '//div[@class="g"]' +# google results are grouped into <div class="g ..." ../> +results_xpath = '//div[contains(@class, "g")]' # google *sections* are no usual *results*, we ignore them g_section_with_header = './g-section-with-header' @@ -124,8 +124,8 @@ title_xpath = './/h3[1]' # href=...> href_xpath = './/div[@class="yuRUbf"]//a/@href' -# in the result group there is <div class="IsZvec" ../> containing he *content* -content_xpath = './/div[@class="IsZvec"]' +# in the result group there is <div class="VwiC3b ..." ../> containing the *content* +content_xpath = './/div[contains(@class, "VwiC3b")]' # Suggestions are links placed in a *card-section*, we extract only the text # from the links not the links itself. |