diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html
index 541da8ba..f352cd09 100644
--- a/searx/templates/oscar/infobox.html
+++ b/searx/templates/oscar/infobox.html
@@ -3,7 +3,7 @@
- {% if infobox.img_src %}
{% endif %}
+ {% if infobox.img_src %}
{% endif %}
{% if infobox.content %}
{{ infobox.content }}
{% endif %}
{% if infobox.attributes %}
diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html
index 3fe9b913..0f090d86 100644
--- a/searx/templates/oscar/result_templates/default.html
+++ b/searx/templates/oscar/result_templates/default.html
@@ -1,9 +1,9 @@
{% from 'oscar/macros.html' import icon %}
-
+
-{% if result.publishedDate %}
{% endif %}
-
{{ icon('link') }} {{ _('cached') }}
+{% if result.publishedDate %}
{% endif %}
+
{{ icon('link') }} {{ _('cached') }}
{% if result.content %}
{{ result.content|safe }}
{% endif %}
diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html
index 91838cba..7689f9f5 100644
--- a/searx/templates/oscar/result_templates/images.html
+++ b/searx/templates/oscar/result_templates/images.html
@@ -1,5 +1,5 @@
-
+
@@ -7,7 +7,7 @@
diff --git a/searx/templates/oscar/result_templates/map.html b/searx/templates/oscar/result_templates/map.html
index 531146dc..343e713c 100644
--- a/searx/templates/oscar/result_templates/map.html
+++ b/searx/templates/oscar/result_templates/map.html
@@ -1,8 +1,8 @@
{% from 'oscar/macros.html' import icon %}
-
+
-{% if result.publishedDate %}
{% endif %}
+{% if result.publishedDate %}
{% endif %}
{{ icon('link') }} {{ _('cached') }}
diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html
index a234a176..1e133e3c 100644
--- a/searx/templates/oscar/result_templates/torrent.html
+++ b/searx/templates/oscar/result_templates/torrent.html
@@ -1,9 +1,9 @@
{% from 'oscar/macros.html' import icon %}
-
+
-{% if result.publishedDate %}
{% endif %}
-
{{ icon('link') }} {{ _('cached') }}
+{% if result.publishedDate %}
{% endif %}
+
{{ icon('link') }} {{ _('cached') }}
{{ icon('transfer') }} {{ _('Seeder') }} {{ result.seed }}, {{ _('Leecher') }} {{ result.leech }}
diff --git a/searx/templates/oscar/result_templates/videos.html b/searx/templates/oscar/result_templates/videos.html
index 0d6cf50a..06275b86 100644
--- a/searx/templates/oscar/result_templates/videos.html
+++ b/searx/templates/oscar/result_templates/videos.html
@@ -1,13 +1,13 @@
{% from 'oscar/macros.html' import icon %}
-
+
-{% if result.publishedDate %}
{% endif %}
-
{{ icon('link') }} {{ _('cached') }}
+{% if result.publishedDate %}
{% endif %}
+
{{ icon('link') }} {{ _('cached') }}
-
+
{% if result.content %}
{{ result.content|safe }}
{% endif %}
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html
index deda276f..69f8c923 100644
--- a/searx/templates/oscar/results.html
+++ b/searx/templates/oscar/results.html
@@ -51,6 +51,11 @@
-
- {% if infoboxes %}
- {% for infobox in infoboxes %}
- {% include 'oscar/infobox.html' %}
- {% endfor %}
- {% endif %}
-
{% endblock %}
diff --git a/searx/webapp.py b/searx/webapp.py
index 57a16ff4..9f09f51f 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -294,10 +294,9 @@ def index():
# TODO, check if timezone is calculated right
if 'publishedDate' in result:
- if result['publishedDate'].replace(tzinfo=None)\
- >= datetime.now() - timedelta(days=1):
- timedifference = datetime.now() - result['publishedDate']\
- .replace(tzinfo=None)
+ result['pubdate'] = result['publishedDate'].strftime('%Y-%m-%d %H:%M:%S%z')
+ if result['publishedDate'].replace(tzinfo=None) >= datetime.now() - timedelta(days=1):
+ timedifference = datetime.now() - result['publishedDate'].replace(tzinfo=None)
minutes = int((timedifference.seconds / 60) % 60)
hours = int(timedifference.seconds / 60 / 60)
if hours == 0:
@@ -305,8 +304,6 @@ def index():
else:
result['publishedDate'] = gettext(u'{hours} hour(s), {minutes} minute(s) ago').format(hours=hours, minutes=minutes) # noqa
else:
- result['pubdate'] = result['publishedDate']\
- .strftime('%a, %d %b %Y %H:%M:%S %z')
result['publishedDate'] = format_date(result['publishedDate'])
if search.request_data.get('format') == 'json':