|
|
#1 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jul 2008
Location: Europe
Device: Sony Portable Reader PRS-505
|
Request for Recipes
Hello,
First of all I would like to thanks Kovid and the other developers of calibre for their great work. This is really a great program. I have to say that my skills in programming are rather limited and although I tried by myself to create some recipes by following the tutorial, I was not able to get a satisfactory result for the following newspapers: De Morgen: http://www.demorgen.be/dm/nl/1361/rs...rssFeeds.dhtml De Standaard: http://feeds.feedburner.com/dso-front I would greatly appreciate some help here. I hope that the fact that it is in Dutch does not make it too difficult. Cheers! |
|
|
|
|
|
#2 | ||
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
Quote:
Code:
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
'''
demorgen.be
'''
from calibre.web.feeds.news import BasicNewsRecipe
class dmg(BasicNewsRecipe):
title = u'DeMorgen.be'
__author__ = u'Darko Miletic'
description = u'news from Belgium'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
keep_only_tags = [dict(name='div' , attrs={'class':'art_box2'})]
feeds = [
(u'Nieuws' , u'http://www.demorgen.be/nieuws/rss.xml' )
,(u'De Gedachte' , u'http://www.demorgen.be/degedachte/rss.xml' )
,(u'Financiele morgen' , u'http://www.demorgen.be/financielemorgen/rss.xml')
,(u'Financiele morgen' , u'http://www.demorgen.be/financielemorgen/rss.xml')
,(u'Sport' , u'http://www.demorgen.be/sport/rss.xml' )
,(u'Bis' , u'http://www.demorgen.be/bis/rss.xml' )
,(u'Magazine' , u'http://www.demorgen.be/magazine/rss.xml' )
,(u'De stand der dingen', u'http://www.demorgen.be/standderdingen/rss.xml' )
]
Quote:
Code:
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
'''
standaard.be
'''
from calibre.web.feeds.news import BasicNewsRecipe
class Destandaard(BasicNewsRecipe):
title = u'De Standaard'
__author__ = u'Darko Miletic'
description = u'news from Belgium'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
keep_only_tags = [dict(name='div' , attrs={'id':'_parts_midContainer_div'})]
remove_tags_after = dict(name='h3', attrs={'title':'Binnenland'})
remove_tags = [
dict(name='h3' , attrs={'title':'Binnenland' })
,dict(name='p' , attrs={'class':'by' })
,dict(name='div' , attrs={'class':'articlesright'})
,dict(name='a' , attrs={'class':'help' })
,dict(name='a' , attrs={'class':'archive' })
,dict(name='a' , attrs={'class':'print' })
,dict(name='a' , attrs={'class':'email' })
]
feeds = [
(u'De Standaard Online', u'http://feeds.feedburner.com/dso-front')
]
|
||
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jul 2008
Location: Europe
Device: Sony Portable Reader PRS-505
|
Thanks a lot Kiklop!
Dutch is a rather difficult language to learn and for me a good way to improve is be reading newspapers. Thanks to you I'll now be able to do so on my reader! Cheers! |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Request for recipes of sites with no rss | PipSqueak | Recipes | 1 | 10-16-2010 11:05 PM |
| Where my recipes are kept? | bthoven | Calibre | 6 | 02-26-2010 01:20 AM |
| Help with RSS recipes | fmma | Calibre | 1 | 06-15-2009 12:51 PM |
| Request for recipes | mccande | Calibre | 4 | 12-26-2008 02:05 AM |
| Request for Recipes | girlperson1 | Calibre | 4 | 11-12-2008 04:25 PM |