mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	wikipedia engine: update _fetch_supported_languages
the layout https://meta.wikimedia.org/wiki/List_of_Wikipedias has changed
This commit is contained in:
		
							parent
							
								
									8256de2fe8
								
							
						
					
					
						commit
						bfca63c536
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue