The examples provided on the main page work fine for me. However they are based on building your items up individually and then passing them into the feed.
In my case I am walking a folder structure and building an items list. I think my modification is very straight forward however when I print the rss, I end up with "[[...]]" instead of my actual serialized items.
share_urls = get_urls()
items = []
for share_url in share_urls:
itunes_item = iTunesItem(
author = author,
image = logo_url,
explicit = "yes",
subtitle = "Test Subtitle",
summary = description)
item = Item(
title = title,
link = homepage,
description = description,
author = author,
guid = Guid(homepage),
pubDate = datetime.datetime(2014, 12, 29, 10, 00),
enclosure = Enclosure(url=share_url, length=0, type=''),
extensions = [itunes_item])
items.append(items)
itunes = iTunes(
author = author,
subtitle = description,
summary = description,
image = logo_url,
explicit = "yes",
owner = iTunesOwner(name = author, email = email))
feed = Feed(
title = title,
link = homepage,
description = description,
language = "en-US",
lastBuildDate = datetime.datetime.now(),
items = [ Item(items) ], # <<<--- I feel like my main issue is here but I'm not sure what I'm doing wrong
extensions = [itunes])
print(feed.rss())
feed take in parameter items a list of items. the variable items is a type list. So you send a list of item surrounded by []. I think it will work better with items = items,. :-)
The examples provided on the main page work fine for me. However they are based on building your items up individually and then passing them into the feed.
In my case I am walking a folder structure and building an items list. I think my modification is very straight forward however when I print the rss, I end up with "[[...]] " instead of my actual serialized items.