diff options
| author | Marc Abonce Seguin <marc-abonce@mailbox.org> | 2020-09-20 23:01:06 -0700 |
|---|---|---|
| committer | Alexandre Flament <alex@al-f.net> | 2020-09-22 11:37:44 +0200 |
| commit | ecf5899153cb58b112fc2c5c745eef91fa36dd6e (patch) | |
| tree | 61aba379785f720f39623fd2a47eb0095f1cbf48 /searx/engines/google.py | |
| parent | c86504b47a321378a50f06fffc31d916036f3b08 (diff) | |
fetch google's search langs rather than ui langs
Diffstat (limited to 'searx/engines/google.py')
| -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 dfc8a0ab8..7dc6b44ac 100644 --- a/searx/engines/google.py +++ b/searx/engines/google.py @@ -282,11 +282,11 @@ def _fetch_supported_languages(resp): ret_val = {} dom = html.fromstring(resp.text) - radio_buttons = eval_xpath(dom, '//*[@id="langSec"]//input[@name="lang"]') + radio_buttons = eval_xpath(dom, '//*[@id="langSec"]//input[@name="lr"]') for x in radio_buttons: name = x.get("data-name") - code = x.get("value") + code = x.get("value").split('_')[-1] ret_val[code] = {"name": name} return ret_val |