![]() |
#1 |
Member
![]() Posts: 13
Karma: 10
Join Date: Oct 2008
Device: PRS-505
|
Request for recipes
This is a great program.
My early attempts at writing recipes in Python were not a great success. Could anyone help with a recipe for the following publications http://www.timesonline.co.uk/tol/news/ and http://thescotsman.scotsman.com/ Both have RSS feeds Thanks |
![]() |
![]() |
![]() |
#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>' ''' timesonline.co.uk ''' from calibre.web.feeds.news import BasicNewsRecipe class Timesonline(BasicNewsRecipe): title = u'The Times Online' __author__ = 'Darko Miletic' description = 'UK news' oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False simultaneous_downloads = 1 remove_tags_after = dict(name='div', attrs={'class':'bg-666'}) remove_tags = [ dict(name='div' , attrs={'class':'hide-from-print padding-bottom-7' }) ] feeds = [ (u'Top stories from Times Online', u'http://www.timesonline.co.uk/tol/feeds/rss/topstories.xml' ) ] def print_version(self, url): main, split, rest = url.partition('#') return main + '?print=yes' Quote:
Code:
#!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>' ''' thescotsman.scotsman.com ''' from calibre.web.feeds.news import BasicNewsRecipe class Thescotsman(BasicNewsRecipe): title = u'The Scotsman' __author__ = 'Darko Miletic' description = 'News from Scotland' oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False simultaneous_downloads = 1 keep_only_tags = [dict(name='div', attrs={'id':'viewarticle'})] remove_tags = [ dict(name='div' , attrs={'class':'viewarticlepanel' }) ] feeds = [ (u'Latest National News', u'http://thescotsman.scotsman.com/getFeed.aspx?Format=rss§ionid=4068') ] |
||
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 13
Karma: 10
Join Date: Oct 2008
Device: PRS-505
|
Thanks a lot. You make it look so easy.
|
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Dec 2008
Device: ILiad
|
Hello everyone. Could someone please create a recipe for the newsfeeds of allafrica.com, (explicit; Top News, Southern Africa, Guinea and South Africa)?
http://allafrica.com/tools/headlines/rss.html The recipe should be able to fetch the print versions of the articles. I tried so much to get it on the last weeks, but I am a totally noob and have no idea about calibre or python. It would be very nice, if someone else could do this for me ![]() Greetings, Ronald |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Request for recipes of sites with no rss | PipSqueak | Recipes | 1 | 10-16-2010 10:05 PM |
Where my recipes are kept? | bthoven | Calibre | 6 | 02-26-2010 12:20 AM |
Help with RSS recipes | fmma | Calibre | 1 | 06-15-2009 11:51 AM |
Request for Recipes | GPThomson | Calibre | 2 | 11-21-2008 12:19 PM |
Request for Recipes | girlperson1 | Calibre | 4 | 11-12-2008 03:25 PM |