diff options
Diffstat (limited to 'searx/engines/filecrop.py')
-rw-r--r-- | searx/engines/filecrop.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/searx/engines/filecrop.py b/searx/engines/filecrop.py index 71665bd4e..ed57a6bf3 100644 --- a/searx/engines/filecrop.py +++ b/searx/engines/filecrop.py @@ -1,5 +1,9 @@ -from urllib import urlencode -from HTMLParser import HTMLParser +from searx.url_utils import urlencode + +try: + from HTMLParser import HTMLParser +except: + from html.parser import HTMLParser url = 'http://www.filecrop.com/' search_url = url + '/search.php?{query}&size_i=0&size_f=100000000&engine_r=1&engine_d=1&engine_e=1&engine_4=1&engine_m=1&pos={index}' # noqa @@ -73,8 +77,7 @@ class FilecropResultParser(HTMLParser): def request(query, params): index = 1 + (params['pageno'] - 1) * 30 - params['url'] = search_url.format(query=urlencode({'w': query}), - index=index) + params['url'] = search_url.format(query=urlencode({'w': query}), index=index) return params |