diff --git a/searx/static/themes/simple/xsl/rss.xsl b/searx/static/themes/simple/xsl/rss.xsl new file mode 100644 index 000000000..7de7f8037 --- /dev/null +++ b/searx/static/themes/simple/xsl/rss.xsl @@ -0,0 +1,39 @@ + + + + + + + <xsl:value-of select="channel/title" />RSS Feed + + + + + +
+

+ +

+
+
+
+ + + +
+ + +
+
diff --git a/searx/templates/simple/opensearch_response_rss.xml b/searx/templates/simple/opensearch_response_rss.xml index 82d3f7c4e..574f32e69 100644 --- a/searx/templates/simple/opensearch_response_rss.xml +++ b/searx/templates/simple/opensearch_response_rss.xml @@ -1,11 +1,12 @@ + - Searx search: {{ q|e }} + SearXNG search: {{ q|e }} {{ url_for('search', _external=True) }}?q={{ q|e }} - Search results for "{{ q|e }}" - searx + Search results for "{{ q|e }}" - SearXNG {{ number_of_results }} 1 {{ number_of_results }} @@ -20,34 +21,11 @@ {% for r in results %} {{ r.title }} + result {{ r.url }} {{ r.content }} {% if r.pubdate %}{{ r.pubdate }}{% endif %} {% endfor %} - {% if answers %} - {% for a in answers %} - - {{ a }} - answer - - {% endfor %} - {% endif %} - {% if corrections %} - {% for a in corrections %} - - {{ a }} - correction - - {% endfor %} - {% endif %} - {% if suggestions %} - {% for a in suggestions %} - - {{ a }} - suggestion - - {% endfor %} - {% endif %} diff --git a/searx/webapp.py b/searx/webapp.py index d2d486d20..6563fce05 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -740,9 +740,6 @@ def search(): response_rss = render( 'opensearch_response_rss.xml', results=results, - answers=result_container.answers, - corrections=result_container.corrections, - suggestions=result_container.suggestions, q=request.form['q'], number_of_results=result_container.number_of_results, ) diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py index 31bfdec3d..65705d164 100644 --- a/tests/unit/test_webapp.py +++ b/tests/unit/test_webapp.py @@ -180,7 +180,7 @@ class ViewsTestCase(SearxTestCase): # pylint: disable=missing-class-docstring, def test_search_rss(self): result = self.app.post('/search', data={'q': 'test', 'format': 'rss'}) - self.assertIn(b'Search results for "test" - searx', result.data) + self.assertIn(b'Search results for "test" - SearXNG', result.data) self.assertIn(b'3', result.data)