From 1abecbc8355994bc897c8f2dc1cab1b2e65e12f5 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 10 Aug 2022 18:55:31 +0200 Subject: [PATCH] [fix] google - simplify XPath selectors to fetch more results Signed-off-by: Markus Heiser --- searx/engines/google.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/searx/engines/google.py b/searx/engines/google.py index 721df1bc..ba7e562d 100644 --- a/searx/engines/google.py +++ b/searx/engines/google.py @@ -109,22 +109,15 @@ filter_mapping = { # specific xpath variables # ------------------------ -# google results are grouped into
-results_xpath = '//div[contains(@class, "jtfYYd")]' +results_xpath = '//div[contains(@class, "MjjYud")]' +title_xpath = './/h3[1]' +href_xpath = './/a/@href' +content_xpath = './/div[@data-content-feature=1]' results_xpath_mobile_ui = '//div[contains(@class, "g ")]' # google *sections* are no usual *results*, we ignore them g_section_with_header = './g-section-with-header' -# the title is a h3 tag relative to the result group -title_xpath = './/h3[1]' - -# in the result group there is