diff options
| author | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-10-17 12:54:22 +0200 |
|---|---|---|
| committer | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-10-17 12:54:22 +0200 |
| commit | db4ca4784b614e84df6c7de8ffbf56ca39e1cc2e (patch) | |
| tree | ce1dd3eab0d5f75c7b2029ea801b0f858bb17cbc /searx | |
| parent | 8af2184a45d28105876f1e5529c829de3f36a428 (diff) | |
fix faroo engine
Diffstat (limited to 'searx')
| -rw-r--r-- | searx/engines/faroo.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/searx/engines/faroo.py b/searx/engines/faroo.py index 31104353f..500d3c592 100644 --- a/searx/engines/faroo.py +++ b/searx/engines/faroo.py @@ -29,7 +29,7 @@ search_category = {'general': 'web', # do search-request def request(query, params): - offset = (params['pageno'] - 1) * number_of_results + offset = (params['pageno']-1) * number_of_results + 1 categorie = search_category.get(params['category'], 'web') if params['language'] == 'all': @@ -78,7 +78,7 @@ def response(resp): # parse results for result in search_res['results']: - if result['news'] == 'true': + if result['news']: # timestamp (how many milliseconds have passed between now and the beginning of 1970) publishedDate = datetime.datetime.fromtimestamp(result['date']/1000.0) @@ -95,14 +95,14 @@ def response(resp): 'title': result['title'], 'content': result['kwic']}) - # append image result if image url is set - # TODO, show results with an image like in faroo - if result['iurl']: - results.append({'template': 'images.html', - 'url': result['url'], - 'title': result['title'], - 'content': result['kwic'], - 'img_src': result['iurl']}) + # append image result if image url is set + # TODO, show results with an image like in faroo + if result['iurl']: + results.append({'template': 'images.html', + 'url': result['url'], + 'title': result['title'], + 'content': result['kwic'], + 'img_src': result['iurl']}) # return results return results |