From cc4e17b6686dbefe0d57862e045f98f72a4e58fc Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Fri, 2 Jan 2015 12:33:40 +0100 Subject: [PATCH] [fix] pep8 --- searx/engines/flickr-noapi.py | 6 +++--- searx/engines/subtitleseeker.py | 6 +++--- searx/engines/wikidata.py | 5 ++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/searx/engines/flickr-noapi.py b/searx/engines/flickr-noapi.py index f90903647..aa2fa5d3b 100644 --- a/searx/engines/flickr-noapi.py +++ b/searx/engines/flickr-noapi.py @@ -81,9 +81,9 @@ def response(resp): if 'description' in photo: content = content +\ - '' +\ - photo['description'] +\ - '' + '' +\ + photo['description'] +\ + '' # append result results.append({'url': url, diff --git a/searx/engines/subtitleseeker.py b/searx/engines/subtitleseeker.py index c413dcf26..9aaf1947b 100644 --- a/searx/engines/subtitleseeker.py +++ b/searx/engines/subtitleseeker.py @@ -65,9 +65,9 @@ def response(resp): if result.xpath(".//span") != []: content = content +\ - " - (" +\ - result.xpath(".//span//text()")[0].strip() +\ - ")" + " - (" +\ + result.xpath(".//span//text()")[0].strip() +\ + ")" # append result results.append({'url': href, diff --git a/searx/engines/wikidata.py b/searx/engines/wikidata.py index bda80cdca..df976ae35 100644 --- a/searx/engines/wikidata.py +++ b/searx/engines/wikidata.py @@ -2,7 +2,6 @@ import json from requests import get from urllib import urlencode import locale -import time import dateutil.parser result_count = 1 @@ -38,7 +37,7 @@ def response(resp): language = resp.search_params['language'].split('_')[0] if language == 'all': language = 'en' - + try: locale.setlocale(locale.LC_ALL, str(resp.search_params['language'])) except: @@ -47,7 +46,7 @@ def response(resp): except: pass pass - + url = url_detail.format(query=urlencode({'ids': '|'.join(wikidata_ids), 'languages': language + '|en'}))