mirror of
https://github.com/searxng/searxng
synced 2024-11-05 06:01:05 +00:00
[fix] pep8
This commit is contained in:
parent
56c15023b5
commit
cc4e17b668
@ -81,9 +81,9 @@ def response(resp):
|
|||||||
|
|
||||||
if 'description' in photo:
|
if 'description' in photo:
|
||||||
content = content +\
|
content = content +\
|
||||||
'<span class="description">' +\
|
'<span class="description">' +\
|
||||||
photo['description'] +\
|
photo['description'] +\
|
||||||
'</span>'
|
'</span>'
|
||||||
|
|
||||||
# append result
|
# append result
|
||||||
results.append({'url': url,
|
results.append({'url': url,
|
||||||
|
@ -65,9 +65,9 @@ def response(resp):
|
|||||||
|
|
||||||
if result.xpath(".//span") != []:
|
if result.xpath(".//span") != []:
|
||||||
content = content +\
|
content = content +\
|
||||||
" - (" +\
|
" - (" +\
|
||||||
result.xpath(".//span//text()")[0].strip() +\
|
result.xpath(".//span//text()")[0].strip() +\
|
||||||
")"
|
")"
|
||||||
|
|
||||||
# append result
|
# append result
|
||||||
results.append({'url': href,
|
results.append({'url': href,
|
||||||
|
@ -2,7 +2,6 @@ import json
|
|||||||
from requests import get
|
from requests import get
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
import locale
|
import locale
|
||||||
import time
|
|
||||||
import dateutil.parser
|
import dateutil.parser
|
||||||
|
|
||||||
result_count = 1
|
result_count = 1
|
||||||
@ -38,7 +37,7 @@ def response(resp):
|
|||||||
language = resp.search_params['language'].split('_')[0]
|
language = resp.search_params['language'].split('_')[0]
|
||||||
if language == 'all':
|
if language == 'all':
|
||||||
language = 'en'
|
language = 'en'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_ALL, str(resp.search_params['language']))
|
locale.setlocale(locale.LC_ALL, str(resp.search_params['language']))
|
||||||
except:
|
except:
|
||||||
@ -47,7 +46,7 @@ def response(resp):
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
pass
|
pass
|
||||||
|
|
||||||
url = url_detail.format(query=urlencode({'ids': '|'.join(wikidata_ids),
|
url = url_detail.format(query=urlencode({'ids': '|'.join(wikidata_ids),
|
||||||
'languages': language + '|en'}))
|
'languages': language + '|en'}))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user