View Single Post
Old 06-20-2009, 04:51 PM   #2
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by Reader2 View Post
# just for what it is, the "?service=Print" does not work - seems has to pass twice or someting like that - who can help me out?
Your problem is that all rss feeds for that news site are feedburner which means that all url's to articles are aliases to the original url's on the site. That is why simple url replace does not work.

For example an url to the article located here:

Code:
http://www.volkskrant.nl/buitenland/article1246922.ece/Obama_Iran_moet_geweld_afzweren
Is presenter in the rss feed in the default tag "link" as this:

Code:
http://feeds.volkskrant.nl/~r/laatstenieuws/~3/rioZRPmRlxU/Obama_Iran_moet_geweld_afzweren
The original url is located in separate tag "feedburnerrigLink", however I do not know how to extract that. For this you will have to consult Kovid.

this is an example of how this might work:

Code:
class AdvancedUserRecipe1245529539(BasicNewsRecipe):
    title          = u'Volksran'
    oldest_article = 7
    max_articles_per_feed = 100

    feeds          = [(u'latest news', u'http://feeds.volkskrant.nl/laatstenieuws/')]

    def get_article_url(self, article):
        #this does not work
        artl =  article.get('feedburner:origLink', None)
        return artl

    def print_version(self, url):
        return url.replace('?source=rss','?service=Print')
kiklop74 is offline   Reply With Quote