fix faroo engine

This commit is contained in:
Thomas Pointhuber 2014-10-17 12:54:22 +02:00
parent 8af2184a45
commit db4ca4784b

View file

@ -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)