mirror of
https://github.com/searxng/searxng.git
synced 2025-07-15 01:09:21 +02:00
[feat] engines: add reuters news engine
This commit is contained in:
parent
5daa4f0460
commit
9ffa9fb730
5 changed files with 137 additions and 9 deletions
|
@ -694,14 +694,6 @@ def search():
|
|||
if 'title' in result and result['title']:
|
||||
result['title'] = highlight_content(escape(result['title'] or ''), search_query.query)
|
||||
|
||||
if getattr(result, 'publishedDate', None): # do not try to get a date from an empty string or a None type
|
||||
try: # test if publishedDate >= 1900 (datetime module bug)
|
||||
result['pubdate'] = result['publishedDate'].strftime('%Y-%m-%d %H:%M:%S%z')
|
||||
except ValueError:
|
||||
result['publishedDate'] = None
|
||||
else:
|
||||
result['publishedDate'] = webutils.searxng_l10n_timespan(result['publishedDate'])
|
||||
|
||||
# set result['open_group'] = True when the template changes from the previous result
|
||||
# set result['close_group'] = True when the template changes on the next result
|
||||
if current_template != result.template:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue