Pārlūkot izejas kodu

[enh] proper urls

asciimoo 11 gadus atpakaļ
vecāks
revīzija
4bf44076d4
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      searx/engines/wikipedia.py

+ 1
- 1
searx/engines/wikipedia.py Parādīt failu

@@ -10,6 +10,6 @@ def response(resp):
10 10
     search_results = loads(resp.text)
11 11
     results = []
12 12
     for res in search_results.get('query', {}).get('search', []):
13
-        results.append({'url': 'https://en.wikipedia.org/wiki/%s' % res['title'], 'title': res['title']})
13
+        results.append({'url': 'https://en.wikipedia.org/wiki/%s' % res['title'].replace(' ', '_'), 'title': res['title']})
14 14
     return results
15 15