Browse Source

Merge pull request #2363 from dalf/fix-wikipedia-minor

[fix] wikipedia: minor fix: return no result instead of crash in some very few cases.
Alexandre Flament 4 years ago
parent
commit
923bc02c17
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/engines/wikipedia.py

+ 1 - 1
searx/engines/wikipedia.py

@@ -52,7 +52,7 @@ def response(resp):
     api_result = loads(resp.text)
 
     # skip disambiguation pages
-    if api_result['type'] != 'standard':
+    if api_result.get('type') != 'standard':
         return []
 
     title = api_result['title']