summaryrefslogtreecommitdiff
path: root/searx/engines/stackoverflow.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-10-20 21:31:16 +0200
committerasciimoo <asciimoo@gmail.com>2013-10-20 21:31:16 +0200
commite1768ed292ebe08eab37536abe89440a4eec5845 (patch)
treeab20ed6324f93d2e0afe8cb30ae4de8885605c81 /searx/engines/stackoverflow.py
parent7aa89ef7c69624d5be664078dbef480a8e2d802f (diff)
downloadsearxng-e1768ed292ebe08eab37536abe89440a4eec5845.tar.gz
searxng-e1768ed292ebe08eab37536abe89440a4eec5845.zip
[fix] url encoding fix
Diffstat (limited to 'searx/engines/stackoverflow.py')
-rw-r--r--searx/engines/stackoverflow.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/searx/engines/stackoverflow.py b/searx/engines/stackoverflow.py
index 2efce08d6..26310800e 100644
--- a/searx/engines/stackoverflow.py
+++ b/searx/engines/stackoverflow.py
@@ -1,17 +1,16 @@
-from urllib import quote
from lxml import html
from urlparse import urljoin
from cgi import escape
+from urllib import urlencode
categories = ['it']
base_url = 'http://stackoverflow.com/'
-search_url = base_url+'search?q='
+search_url = base_url+'search?'
def request(query, params):
global search_url
- query = quote(query.replace(' ', '+'), safe='+')
- params['url'] = search_url + query
+ params['url'] = search_url + urlencode({'q': query})
return params