We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm probably doing something horribly wrong here, but if I generate an rss feed I can add enclosures with this code without any problems
fe.enclosure(url=original_image_url, length='0', type=f"image/{imgtype}") fe.enclosure(url=proxy_image_url, length='0', type=f"image/{imgtype}")
When I generate the feed as rss
rss_feed = fg.rss_str(pretty=True)
the last enclosure is shown as attachment/enclosure which is what I expected when I create an atom feed
atom_feed = fg.atom_str(pretty=True)
I just get multiple link objects without any reference of them being an enclosure. Here is example code to reproduce this behaviour
enclosure
from feedgen.feed import FeedGenerator fg = FeedGenerator() fg.load_extension('podcast') # Set required fields using the appropriate methods fg.id('bla') fg.title('a') fg.link({'href': 'http://ponyhof.de'}) # Pass a dictionary with 'href' key fg.description('http://ponyhof.de') fg.podcast.itunes_category('Technology', 'Podcasting') fe = fg.add_entry() fe.id('http://lernfunk.de/media/654321/1/file.mp3') fe.title('The First Episode') fe.description('Enjoy our first episode.') fe.enclosure('http://lernfunk.de/media/654321/1/file.mp3', 0, 'audio/mpeg') fe.enclosure('http://lernfunk.de/media/654321/2/file.mp3', 0, 'audio/mpeg') # Generate the RSS feed rss_feed = fg.rss_str(pretty=True) print(rss_feed) # Optional: print the RSS feed to the console fg.rss_file('podcast-rss.xml') fg.atom_file('podcast-atom.xml')
Here is your documentation specifying that it should work https://python-feedgen.readthedocs.io/en/latest/api.entry.html#feedgen.entry.FeedEntry.enclosure Here is the atom rfc specifying how it should look https://validator.w3.org/feed/docs/rfc4287.html
<link rel="enclosure" type="audio/mpeg" length="1337" href="http://example.org/audio/ph34r_my_podcast.mp3"/>
please tell me I'm doing something wrong
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm probably doing something horribly wrong here, but if I generate an rss feed I can add enclosures with this code without any problems
When I generate the feed as rss
the last enclosure is shown as attachment/enclosure which is what I expected when I create an atom feed
I just get multiple link objects without any reference of them being an
enclosure
.Here is example code to reproduce this behaviour
Here is your documentation specifying that it should work https://python-feedgen.readthedocs.io/en/latest/api.entry.html#feedgen.entry.FeedEntry.enclosure
Here is the atom rfc specifying how it should look https://validator.w3.org/feed/docs/rfc4287.html
please tell me I'm doing something wrong
The text was updated successfully, but these errors were encountered: