SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
adding publish date to video-results and rss-feed
Thomas Pointhuber6f49bd8f08fb
diff --git a/searx/templates/opensearch_response_rss.xml b/searx/templates/opensearch_response_rss.xmlindex 417b195a3..5673eb2e1 100644--- a/searx/templates/opensearch_response_rss.xml+++ b/searx/templates/opensearch_response_rss.xml@@ -16,6 +16,7 @@<title>{{ r.title }}</title><link>{{ r.url }}</link><description>{{ r.content }}</description>+ {% if r.pubdate %}<pubDate>{{ r.pubdate }}</pubDate>{% endif %}</item>{% endfor %}</channel>diff --git a/searx/templates/result_templates/videos.html b/searx/templates/result_templates/videos.htmlindex d3391f0d3..ab869a6eb 100644--- a/searx/templates/result_templates/videos.html+++ b/searx/templates/result_templates/videos.html@@ -5,6 +5,7 @@<p><h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>+ {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}<a href="{{ result.url }}"><img width="400px" src="{{ result.thumbnail }}" title={{ result.title }} alt=" {{ result.title }}"/></a><p class="url">{{ result.url }}</p></p>diff --git a/searx/webapp.py b/searx/webapp.pyindex a52dd6289..d06c58f32 100644--- a/searx/webapp.py+++ b/searx/webapp.py@@ -168,6 +168,8 @@ def index():else:result['publishedDate'] = gettext(u'{hours} hour(s), {minutes} minute(s) ago').format(hours=hours, minutes=minutes) # noqaelse:+ # TODO using right timezone+ result['pubdate'] = result['publishedDate'].strftime('%a, %d %b %Y %H:%M:%S +0000')result['publishedDate'] = format_date(result['publishedDate'])if search.request_data.get('format') == 'json':