From 3144ec1d5926a2f445da63fc7d6ea7efe00c6d26 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Tue, 6 Sep 2016 17:17:42 +0200 Subject: [fix] unicode urls --- searx/engines/translated.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'searx/engines/translated.py') diff --git a/searx/engines/translated.py b/searx/engines/translated.py index 3a077ae8e..02047bc93 100644 --- a/searx/engines/translated.py +++ b/searx/engines/translated.py @@ -9,16 +9,12 @@ @parse url, title, content """ import re -from urlparse import urljoin -from lxml import html from cgi import escape -from searx.engines.xpath import extract_text from searx.utils import is_valid_lang categories = ['general'] -url = 'http://api.mymemory.translated.net/get?q={query}' \ - '&langpair={from_lang}|{to_lang}{key}' -web_url = 'http://mymemory.translated.net/en/{from_lang}/{to_lang}/{query}' +url = u'http://api.mymemory.translated.net/get?q={query}&langpair={from_lang}|{to_lang}{key}' +web_url = u'http://mymemory.translated.net/en/{from_lang}/{to_lang}/{query}' weight = 100 parser_re = re.compile(u'.*?([a-z]+)-([a-z]+) (.{2,})$', re.I) -- cgit v1.2.3-54-g00ecf