python rss feed generator giving wrong format

  flask, python, rss

i’m trying to render a playexample of an rss-feed for my flask application.
I have the following code:

from flask import Flask, render_template, flash, redirect, make_response
from config import Config
from feedgen.feed import FeedGenerator
app = Flask(__name__)
 strengs = ["noget", "lorem ipsum", "dingledongle"]
def xml2():
    fg = FeedGenerator()
    fg.title('Feed title')
    fg.description('Feed description')'')

    f = open("xss.txt", "r")

    n = 0 

    for i in strengs:

        ns = str(n)

        fe = fg.add_entry()
        fe.guid(ns, permalink=False) # Or: fe.guid(article.url, permalink=True)"garse", email="[email protected]")
        n = n + 1

    response = make_response(fg.rss_str())
    response.headers.set('Content-Type', 'application/rss+xml')

    return response

So I just wanna render a rss feed with 3 articles with these 3 strings in them. The xml file rendered looks correct to me:

<?xml version='1.0' encoding='UTF-8'?>
<rss xmlns:atom="" xmlns:content="" version="2.0"><channel><title>Feed title</title><link></link><description>Feed description</description><docs></docs><generator>python-feedgen</generator><lastBuildDate>Thu, 08 Apr 2021 14:55:38 +0000</lastBuildDate><item><title>hi</title><link></link><description>dingledongle</description><author>[email protected] (garse)</author><guid isPermaLink="false">2</guid></item><item><title>hi</title><link></link><description>lorem ipsum</description><author>[email protected] (garse)</author><guid isPermaLink="false">1</guid></item><item><title>hi</title><link></link><description>noget</description><author>[email protected] (garse)</author><guid isPermaLink="false">0</guid></item></channel></rss>

But when I then make my rss-reader (raven reader) read this xml file, it only generates one single article Where only the first article is shown, the with the "noget" description.

How do I render several articles in my rss feed? am I doing something wrong here?

Source: Python Questions