From 52e615dede8538c36f569d2cf07835427a9a0db6 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Wed, 30 Nov 2016 18:43:03 +0100 Subject: [enh] py3 compatibility --- searx/engines/torrentz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'searx/engines/torrentz.py') diff --git a/searx/engines/torrentz.py b/searx/engines/torrentz.py index f9c832651..dda56fc22 100644 --- a/searx/engines/torrentz.py +++ b/searx/engines/torrentz.py @@ -12,11 +12,11 @@ """ import re -from urllib import urlencode from lxml import html -from searx.engines.xpath import extract_text from datetime import datetime from searx.engines.nyaa import int_or_zero, get_filesize_mul +from searx.engines.xpath import extract_text +from searx.url_utils import urlencode # engine dependent config categories = ['files', 'videos', 'music'] @@ -70,7 +70,7 @@ def response(resp): size_str = result.xpath('./dd/span[@class="s"]/text()')[0] size, suffix = size_str.split() params['filesize'] = int(size) * get_filesize_mul(suffix) - except Exception as e: + except: pass # does our link contain a valid SHA1 sum? @@ -84,7 +84,7 @@ def response(resp): # Fri, 25 Mar 2016 16:29:01 date = datetime.strptime(date_str, '%a, %d %b %Y %H:%M:%S') params['publishedDate'] = date - except Exception as e: + except: pass results.append(params) -- cgit v1.2.3-54-g00ecf