summaryrefslogtreecommitdiff
path: root/searx/engines/nyaa.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2016-12-09 23:11:45 +0100
committerGitHub <noreply@github.com>2016-12-09 23:11:45 +0100
commite48f07a367e55bf8aa881902b977bd7ce1cd2bb6 (patch)
tree8b285b2dd483006d08c03b9fec49cba49ff16a87 /searx/engines/nyaa.py
parent219f047bf359ce94397241b875639f3aaddb0fe5 (diff)
parentd80fb2c8e8995facb3a25c152c47a93eecf1fee4 (diff)
Merge branch 'master' into searchpy2
Diffstat (limited to 'searx/engines/nyaa.py')
-rw-r--r--searx/engines/nyaa.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/searx/engines/nyaa.py b/searx/engines/nyaa.py
index cda8231f7..4ca5b3171 100644
--- a/searx/engines/nyaa.py
+++ b/searx/engines/nyaa.py
@@ -9,7 +9,6 @@
@parse url, title, content, seed, leech, torrentfile
"""
-from cgi import escape
from urllib import urlencode
from lxml import html
from searx.engines.xpath import extract_text
@@ -78,7 +77,7 @@ def response(resp):
# torrent title
page_a = result.xpath(xpath_title)[0]
- title = escape(extract_text(page_a))
+ title = extract_text(page_a)
# link to the page
href = page_a.attrib.get('href')
@@ -90,7 +89,7 @@ def response(resp):
try:
file_size, suffix = result.xpath(xpath_filesize)[0].split(' ')
file_size = int(float(file_size) * get_filesize_mul(suffix))
- except Exception as e:
+ except:
file_size = None
# seed count
@@ -105,7 +104,6 @@ def response(resp):
# content string contains all information not included into template
content = 'Category: "{category}". Downloaded {downloads} times.'
content = content.format(category=category, downloads=downloads)
- content = escape(content)
results.append({'url': href,
'title': title,