Commit cc4e17b6 authored by Adam Tauber's avatar Adam Tauber
Browse files

[fix] pep8

parent 56c15023
......@@ -81,9 +81,9 @@ def response(resp):
if 'description' in photo:
content = content +\
'<span class="description">' +\
photo['description'] +\
'</span>'
'<span class="description">' +\
photo['description'] +\
'</span>'
# append result
results.append({'url': url,
......
......@@ -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,
......
......@@ -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'}))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment