From a2ec27696c4af287005a44f4f4518d9e504a96b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milien=20Devos?= Date: Mon, 17 Jan 2022 21:49:57 +0000 Subject: [PATCH] Update XPath for Google engine --- searx/engines/google.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/searx/engines/google.py b/searx/engines/google.py index 3da00659..12db26c4 100644 --- a/searx/engines/google.py +++ b/searx/engines/google.py @@ -108,8 +108,8 @@ filter_mapping = { # specific xpath variables # ------------------------ -# google results are grouped into
-results_xpath = '//div[@class="g"]' +# google results are grouped into
+results_xpath = '//div[contains(@class, "g")]' # google *sections* are no usual *results*, we ignore them g_section_with_header = './g-section-with-header' @@ -121,8 +121,8 @@ title_xpath = './/h3[1]' # href=...> href_xpath = './/div[@class="yuRUbf"]//a/@href' -# in the result group there is
containing he *content* -content_xpath = './/div[@class="IsZvec"]' +# in the result group there is
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.