Quote:
Originally Posted by Reader2
# 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 "feedburner

rigLink", 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')