summaryrefslogtreecommitdiff
path: root/searx/engines/currency_convert.py
diff options
context:
space:
mode:
authorDalf <alex@al-f.net>2020-08-11 16:25:03 +0200
committerAlexandre Flament <alex@al-f.net>2020-09-10 10:49:42 +0200
commitc225db45c8a4ab466bff049216f7e0189dc1b067 (patch)
tree16be3299a6faf15538fc1f2cf181aadc422039fd /searx/engines/currency_convert.py
parent78883777438fc07833d983c50d9b131eb6feb9eb (diff)
Drop Python 2 (4/n): SearchQuery.query is a str instead of bytes
Diffstat (limited to 'searx/engines/currency_convert.py')
-rw-r--r--searx/engines/currency_convert.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/currency_convert.py b/searx/engines/currency_convert.py
index 7281b7175..c6067c4a8 100644
--- a/searx/engines/currency_convert.py
+++ b/searx/engines/currency_convert.py
@@ -11,13 +11,13 @@ categories = []
url = 'https://duckduckgo.com/js/spice/currency/1/{0}/{1}'
weight = 100
-parser_re = re.compile(b'.*?(\\d+(?:\\.\\d+)?) ([^.0-9]+) (?:in|to) ([^.0-9]+)', re.I)
+parser_re = re.compile('.*?(\\d+(?:\\.\\d+)?) ([^.0-9]+) (?:in|to) ([^.0-9]+)', re.I)
db = 1
def normalize_name(name):
- name = name.decode().lower().replace('-', ' ').rstrip('s')
+ name = name.lower().replace('-', ' ').rstrip('s')
name = re.sub(' +', ' ', name)
return unicodedata.normalize('NFKD', name).lower()