Browse Source

Fix Google search engine.

- Fix broken links. Resolves #1794
- Fix missing results. Resolves #1829
ngosang 2 years ago
parent
commit
78be4b4c70
1 changed files with 3 additions and 3 deletions
  1. 3 3
      searx/engines/google.py

+ 3 - 3
searx/engines/google.py

@@ -112,9 +112,9 @@ filter_mapping = {0: 'off', 1: 'medium', 2: 'high'}
 # specific xpath variables
 # ------------------------
 
-results_xpath = '//div[contains(@class, "MjjYud")]'
-title_xpath = './/h3[1]'
-href_xpath = './/a/@href'
+results_xpath = './/div[@data-sokoban-container]'
+title_xpath = './/a/h3[1]'
+href_xpath = './/a[h3]/@href'
 content_xpath = './/div[@data-content-feature=1]'
 
 # google *sections* are no usual *results*, we ignore them