summaryrefslogtreecommitdiff
path: root/searx/engines/dictzone.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-11-30 18:43:03 +0100
committerAdam Tauber <asciimoo@gmail.com>2017-05-15 12:02:30 +0200
commit52e615dede8538c36f569d2cf07835427a9a0db6 (patch)
treeac65990c72156def2d49e81d981f0b3beda4fd2e /searx/engines/dictzone.py
parent46a2c63f8e1c3819cceff2d61fe9106051e8ecee (diff)
downloadsearxng-52e615dede8538c36f569d2cf07835427a9a0db6.tar.gz
searxng-52e615dede8538c36f569d2cf07835427a9a0db6.zip
[enh] py3 compatibility
Diffstat (limited to 'searx/engines/dictzone.py')
-rw-r--r--searx/engines/dictzone.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/searx/engines/dictzone.py b/searx/engines/dictzone.py
index 20a9a8980..7c3478629 100644
--- a/searx/engines/dictzone.py
+++ b/searx/engines/dictzone.py
@@ -10,20 +10,20 @@
"""
import re
-from urlparse import urljoin
from lxml import html
from searx.utils import is_valid_lang
+from searx.url_utils import urljoin
categories = ['general']
url = u'http://dictzone.com/{from_lang}-{to_lang}-dictionary/{query}'
weight = 100
-parser_re = re.compile(u'.*?([a-z]+)-([a-z]+) ([^ ]+)$', re.I)
+parser_re = re.compile(b'.*?([a-z]+)-([a-z]+) ([^ ]+)$', re.I)
results_xpath = './/table[@id="r"]/tr'
def request(query, params):
- m = parser_re.match(unicode(query, 'utf8'))
+ m = parser_re.match(query)
if not m:
return params