diff options
author | Alexandre Flament <alex@al-f.net> | 2023-01-29 10:01:02 +0000 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2023-01-29 10:01:58 +0000 |
commit | bfca63c5365aa77cea34b70cbf929d7b6d0a789d (patch) | |
tree | c5d34bc4d6ba33a26451c6187ab0c8c2ba2e2cd3 /searx/engines/wikipedia.py | |
parent | 8256de2fe85a8b11497289d8e6884710838b20cf (diff) | |
download | searxng-bfca63c5365aa77cea34b70cbf929d7b6d0a789d.tar.gz searxng-bfca63c5365aa77cea34b70cbf929d7b6d0a789d.zip |
wikipedia engine: update _fetch_supported_languages
the layout https://meta.wikimedia.org/wiki/List_of_Wikipedias has changed
Diffstat (limited to 'searx/engines/wikipedia.py')
-rw-r--r-- | searx/engines/wikipedia.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/wikipedia.py b/searx/engines/wikipedia.py index 52b1053ed..ca841e8b3 100644 --- a/searx/engines/wikipedia.py +++ b/searx/engines/wikipedia.py @@ -106,9 +106,9 @@ def _fetch_supported_languages(resp): for tr in trs: td = tr.xpath('./td') code = td[3].xpath('./a')[0].text - name = td[2].xpath('./a')[0].text + name = td[1].xpath('./a')[0].text english_name = td[1].xpath('./a')[0].text - articles = int(td[4].xpath('./a/b')[0].text.replace(',', '')) + articles = int(td[4].xpath('./a')[0].text.replace(',', '')) # exclude languages with too few articles if articles >= 100: supported_languages[code] = {"name": name, "english_name": english_name} |