mirror of
https://github.com/searxng/searxng.git
synced 2025-07-12 15:59:21 +02:00
Drop Python 2 (1/n): remove unicode string and url_utils
This commit is contained in:
parent
272158944b
commit
1022228d95
112 changed files with 388 additions and 535 deletions
|
@ -15,8 +15,8 @@
|
|||
from json import loads
|
||||
from time import time
|
||||
import re
|
||||
from urllib.parse import urlencode
|
||||
from searx.engines import logger
|
||||
from searx.url_utils import urlencode
|
||||
from searx.utils import ecma_unescape, html_to_text
|
||||
|
||||
logger = logger.getChild('flickr-noapi')
|
||||
|
@ -117,10 +117,10 @@ def response(resp):
|
|||
'img_format': img_format,
|
||||
'template': 'images.html'
|
||||
}
|
||||
result['author'] = author.encode('utf-8', 'ignore').decode('utf-8')
|
||||
result['source'] = source.encode('utf-8', 'ignore').decode('utf-8')
|
||||
result['title'] = title.encode('utf-8', 'ignore').decode('utf-8')
|
||||
result['content'] = content.encode('utf-8', 'ignore').decode('utf-8')
|
||||
result['author'] = author.encode(errors='ignore').decode()
|
||||
result['source'] = source.encode(errors='ignore').decode()
|
||||
result['title'] = title.encode(errors='ignore').decode()
|
||||
result['content'] = content.encode(errors='ignore').decode()
|
||||
results.append(result)
|
||||
|
||||
return results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue