mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[enh] py3 compatibility
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
from urllib import urlencode
|
||||
from json import loads
|
||||
from collections import Iterable
|
||||
from json import loads
|
||||
from sys import version_info
|
||||
from searx.url_utils import urlencode
|
||||
|
||||
if version_info[0] == 3:
|
||||
unicode = str
|
||||
|
||||
search_url = None
|
||||
url_query = None
|
||||
content_query = None
|
||||
title_query = None
|
||||
paging = False
|
||||
suggestion_query = ''
|
||||
results_query = ''
|
||||
|
||||
@@ -20,7 +25,7 @@ first_page_num = 1
|
||||
|
||||
def iterate(iterable):
|
||||
if type(iterable) == dict:
|
||||
it = iterable.iteritems()
|
||||
it = iterable.items()
|
||||
|
||||
else:
|
||||
it = enumerate(iterable)
|
||||
|
||||
Reference in New Issue
Block a user