![]() |
#1 |
intentionally left blank
![]() Posts: 28
Karma: 12
Join Date: Jun 2009
Location: Netherlands
Device: BeBook (display damage) so 2nd: Nook still working; Sony hardly used;
|
Volkskrant / Dutch news feed
For the dutch readers some code:
# -*- coding: utf-8 -*- class AdvancedUserRecipe1245357002(BasicNewsRecipe): title = u'Volkskrant' oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True feeds = [(u'laatstenieuws',u'http://feeds.volkskrant.nl/laatstenieuws/'),(u'nederland',u'http://feeds.volkskrant.nl/nederland/'),(u'economie',u'http://feeds.volkskrant.nl/economie/'),(u'kunst',u'http://feeds.volkskrant.nl/kunst/'),(u'wetenschap',u'http://feeds.feedburner.com/DeVolkskrantWetenschap/'),(u'techniek',u'http://feeds.feedburner.com/vkmedia/'), ] remove_tags = [dict(name='div', attrs={'class':['mainItems','subItems','menuBarRight','zoek']}),dict(name='div', attrs={'id':['header','domeinenmenu','menuWrapper','zoek','prin tversie']})] remove_tags_after = [dict(name='div', attrs={'class':'article_tools'})] def print_version(self, url): return url+'?service=Print' # 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? |
![]() |
![]() |
![]() |
#2 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
Quote:
For example an url to the article located here: Code:
http://www.volkskrant.nl/buitenland/article1246922.ece/Obama_Iran_moet_geweld_afzweren Code:
http://feeds.volkskrant.nl/~r/laatstenieuws/~3/rioZRPmRlxU/Obama_Iran_moet_geweld_afzweren ![]() 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') |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,207
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Here's what you need
Code:
def get_article_url(self, article): return article.get('feedburner_origlink', article.get('guid', article.get('link'))) |
![]() |
![]() |
![]() |
#4 |
intentionally left blank
![]() Posts: 28
Karma: 12
Join Date: Jun 2009
Location: Netherlands
Device: BeBook (display damage) so 2nd: Nook still working; Sony hardly used;
|
THX again. I just gave it a try - and did manage it on the dirty way. Thx for the "feedburner" hint, this will do for more sites.
Mmm, what an active forum this is. Great |
![]() |
![]() |
![]() |
#5 |
intentionally left blank
![]() Posts: 28
Karma: 12
Join Date: Jun 2009
Location: Netherlands
Device: BeBook (display damage) so 2nd: Nook still working; Sony hardly used;
|
Great, its now included as Dutch feed.
|
![]() |
![]() |
Advert | |
|
![]() |
Tags |
custom news source, nederlands |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Two different formats on news feed | TonytheBookworm | Calibre | 3 | 10-06-2010 11:51 AM |
News Feed Covers | DenverReader | Calibre | 4 | 02-06-2010 12:00 AM |
News feed scheduling | nickredding | Calibre | 1 | 01-24-2010 07:28 PM |
News feed error | thibaulthalpern | Calibre | 4 | 03-22-2009 02:21 AM |
Need help creating a news feed | ficbot | Calibre | 3 | 03-18-2009 02:44 AM |