|
@@ -9,16 +9,12 @@
|
9
|
9
|
@parse url, title, content
|
10
|
10
|
"""
|
11
|
11
|
import re
|
12
|
|
-from urlparse import urljoin
|
13
|
|
-from lxml import html
|
14
|
12
|
from cgi import escape
|
15
|
|
-from searx.engines.xpath import extract_text
|
16
|
13
|
from searx.utils import is_valid_lang
|
17
|
14
|
|
18
|
15
|
categories = ['general']
|
19
|
|
-url = 'http://api.mymemory.translated.net/get?q={query}' \
|
20
|
|
- '&langpair={from_lang}|{to_lang}{key}'
|
21
|
|
-web_url = 'http://mymemory.translated.net/en/{from_lang}/{to_lang}/{query}'
|
|
16
|
+url = u'http://api.mymemory.translated.net/get?q={query}&langpair={from_lang}|{to_lang}{key}'
|
|
17
|
+web_url = u'http://mymemory.translated.net/en/{from_lang}/{to_lang}/{query}'
|
22
|
18
|
weight = 100
|
23
|
19
|
|
24
|
20
|
parser_re = re.compile(u'.*?([a-z]+)-([a-z]+) (.{2,})$', re.I)
|