View Single Post
Old 04-20-2011, 04:03 AM   #1
xtepn01
Junior Member
xtepn01 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2011
Device: Kindle3
Accessing RSS feed

Hi,
I've created lots of recipes and I think I understand the basics of recipe preparations. However, lately I've stumbled upon two problems:

1) One recipe is based solely on RSS data, no parsing of linked article HTML (using use_embedded_content=True)
Everything works alright, however I would like to add an image into the article content. Unfortunately this image is not part of RSS content HTML but rather specified as RSS tag <enclosure>. I understand, that I can use preprocess_html method to append custom <img> tag to content. However, I'm unable to find a way to retrieve additional RSS tags. I understand, that feedparser is used to transform regular RSS tags to article data, but I don't know how (and where) to parse additional RSS tags. Any pointers?

2) populate_article_metadata is a great method, but what about the other way? I would like to access article metadata from methods such as preprocess_html/postprocess_html but I cant find a way to get the currently processed article object. The reason i need this, is that I want to add an author byline into the article content (even though the author is properly filled in article metadata, it does not show in Kindle when reading the article - is it supposed to be seen there? Where? Below title? At the end?).

I've read many posts and recipes posted here, but i cant find an answer for any of those. Thanks a lot for any help.
xtepn01 is offline   Reply With Quote