diff options
| author | Alexandre Flament <alex@al-f.net> | 2022-05-08 10:45:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-08 10:45:45 +0200 |
| commit | 85c1c14fd7e8ff217ff57509cf9d58ec92f7af9a (patch) | |
| tree | 8e29e2083e235a315345c9c43ddff0f962340fde /searx/templates/simple/opensearch_response_rss.xml | |
| parent | 6db568bf69b7145451ff90e14da0e49fb5b6269b (diff) | |
| parent | 1e45dbbae9b6bb7b85ce6620556b955799ed4fe5 (diff) | |
Merge pull request #1186 from dalf/theme_remove_common
Theme: remove __common__ directories
Diffstat (limited to 'searx/templates/simple/opensearch_response_rss.xml')
| -rw-r--r-- | searx/templates/simple/opensearch_response_rss.xml | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/searx/templates/simple/opensearch_response_rss.xml b/searx/templates/simple/opensearch_response_rss.xml new file mode 100644 index 000000000..82d3f7c4e --- /dev/null +++ b/searx/templates/simple/opensearch_response_rss.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<rss version="2.0" + xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" + xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>Searx search: {{ q|e }}</title> + <link>{{ url_for('search', _external=True) }}?q={{ q|e }}</link> + <description>Search results for "{{ q|e }}" - searx</description> + <opensearch:totalResults>{{ number_of_results }}</opensearch:totalResults> + <opensearch:startIndex>1</opensearch:startIndex> + <opensearch:itemsPerPage>{{ number_of_results }}</opensearch:itemsPerPage> + <atom:link rel="search" type="application/opensearchdescription+xml" href="{{ opensearch_url }}"/> + <opensearch:Query role="request" searchTerms="{{ q|e }}" startPage="1" /> + {% if error_message %} + <item> + <title>Error</title> + <description>{{ error_message|e }}</description> + </item> + {% endif %} + {% for r in results %} + <item> + <title>{{ r.title }}</title> + <link>{{ r.url }}</link> + <description>{{ r.content }}</description> + {% if r.pubdate %}<pubDate>{{ r.pubdate }}</pubDate>{% endif %} + </item> + {% endfor %} + {% if answers %} + {% for a in answers %} + <item> + <title>{{ a }}</title> + <type>answer</type> + </item> + {% endfor %} + {% endif %} + {% if corrections %} + {% for a in corrections %} + <item> + <title>{{ a }}</title> + <type>correction</type> + </item> + {% endfor %} + {% endif %} + {% if suggestions %} + {% for a in suggestions %} + <item> + <title>{{ a }}</title> + <type>suggestion</type> + </item> + {% endfor %} + {% endif %} + </channel> +</rss> |