diff options
Diffstat (limited to 'searx/engines/google.py')
| -rw-r--r-- | searx/engines/google.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/searx/engines/google.py b/searx/engines/google.py index 49d7f6499..7a4390fc6 100644 --- a/searx/engines/google.py +++ b/searx/engines/google.py @@ -381,10 +381,10 @@ def attributes_to_html(attributes): def _fetch_supported_languages(resp): supported_languages = {} dom = html.fromstring(resp.text) - options = dom.xpath('//table//td/font/label/span') + options = dom.xpath('//*[@id="langSec"]//input[@name="lr"]') for option in options: - code = option.xpath('./@id')[0][1:] - name = option.text.title() + code = option.xpath('./@value')[0].split('_')[-1] + name = option.xpath('./@data-name')[0].title() supported_languages[code] = {"name": name} return supported_languages |