diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2022-07-26 07:21:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-26 07:21:37 +0200 |
| commit | 50ec821e8c5b099947d657722b1879fc8c03bcfa (patch) | |
| tree | 5c2a5357bfc6cd65bf87a4faede0f476c6474e41 | |
| parent | 747cf1a246df587aeb3b6b175c315ef0b9612dc4 (diff) | |
| parent | c72d70d45c5a9d7ed2e884db90ec6b84135f31a9 (diff) | |
Merge pull request #1556 from tiekoetter/fix-google-results-xpath
[fix] google engine: results XPath
| -rw-r--r-- | searx/engines/google.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/google.py b/searx/engines/google.py index 4468558ac..0d116db9f 100644 --- a/searx/engines/google.py +++ b/searx/engines/google.py @@ -112,7 +112,7 @@ filter_mapping = {0: 'off', 1: 'medium', 2: 'high'} # ------------------------ # google results are grouped into <div class="jtfYYd ..." ../> -results_xpath = '//div[@class="jtfYYd"]' +results_xpath = '//div[contains(@class, "jtfYYd")]' # google *sections* are no usual *results*, we ignore them g_section_with_header = './g-section-with-header' @@ -287,7 +287,6 @@ def request(query, params): 'oe': "utf8", 'start': offset, 'filter': '0', - 'ucbcb': 1, **additional_parameters, } ) @@ -299,6 +298,7 @@ def request(query, params): query_url += '&' + urlencode({'safe': filter_mapping[params['safesearch']]}) params['url'] = query_url + params['cookies']['CONSENT'] = "YES+" params['headers'].update(lang_info['headers']) if use_mobile_ui: params['headers']['Accept'] = '*/*' |