08-11-2008, 10:13 AM | #1 |
Member
Posts: 13
Karma: 10
Join Date: Aug 2008
Device: Sony PRS505
|
Problem with News scripts
Hi,
I've been using this great software since the day I got my PRS505, and firstly would like to say thanks for the software. I've been having a problem with a script to fetch RSS feeds for a while now and was wondering if someone could point out where I'm going wrong. Originally I was using the script generated by Calibre when you add the feeds: Code:
class AdvancedUserRecipe1218463759(BasicNewsRecipe): title = u'International Herald Tribune' oldest_article = 1 max_articles_per_feed = 15 feeds = [(u'Frontpage', u'http://www.iht.com/rss/frontpage.xml'), (u'Business', u'http://www.iht.com/rss/business.xml'), (u'Americas', u'http://www.iht.com/rss/america.xml'), (u'Europe', u'http://www.iht.com/rss/europe.xml'), (u'Asia', u'http://www.iht.com/rss/asia.xml'), (u'Africa and Middle East', u'http://www.iht.com/rss/africa.xml'), (u'Opinion', u'http://www.iht.com/rss/opinion.xml'), (u'Technology', u'http://www.iht.com/rss/technology.xml'), (u'Health and Science', u'http://www.iht.com/rss/healthscience.xml'), (u'Sports', u'http://www.iht.com/rss/sports.xml'), (u'Culture', u'http://www.iht.com/rss/arts.xml'), (u'Style and Design', u'http://www.iht.com/rss/style.xml'), (u'Travel', u'http://www.iht.com/rss/travel.xml'), (u'At Home Abroad', u'http://www.iht.com/rss/athome.xml'), (u'Your Money', u'http://www.iht.com/rss/yourmoney.xml'), (u'Properties', u'http://www.iht.com/rss/properties.xml')] Here is the current version of my custom script: Code:
class InternationalHeraldTribune(BasicNewsRecipe): title = u'The International Herald Tribune' __author__ = 'Derry FitzGerald' oldest_article = 1 max_articles_per_feed = 15 no_stylesheets = True remove_tags = [dict(name='div', attrs={'class':'footer'})] extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }' feeds = [ (u'Frontpage', u'http://www.iht.com/rss/frontpage.xml'), (u'Business', u'http://www.iht.com/rss/business.xml'), (u'Americas', u'http://www.iht.com/rss/america.xml'), (u'Europe', u'http://www.iht.com/rss/europe.xml'), (u'Asia', u'http://www.iht.com/rss/asia.xml'), (u'Africa and Middle East', u'http://www.iht.com/rss/africa.xml'), (u'Opinion', u'http://www.iht.com/rss/opinion.xml'), (u'Technology', u'http://www.iht.com/rss/technology.xml'), (u'Health and Science', u'http://www.iht.com/rss/healthscience.xml'), (u'Sports', u'http://www.iht.com/rss/sports.xml'), (u'Culture', u'http://www.iht.com/rss/arts.xml'), (u'Style and Design', u'http://www.iht.com/rss/style.xml'), (u'Travel', u'http://www.iht.com/rss/travel.xml'), (u'At Home Abroad', u'http://www.iht.com/rss/athome.xml'), (u'Your Money', u'http://www.iht.com/rss/yourmoney.xml'), (u'Properties', u'http://www.iht.com/rss/properties.xml') ] Hopefully it is something simple that I'm missing. Also here is a simple script for the Irish Times which works pretty well and might be of use to someone, Code:
#!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = '2008, Derry FitzGerald' ''' irishtimes.com ''' from calibre.web.feeds.news import BasicNewsRecipe class IrishTimes(BasicNewsRecipe): title = u'The Irish Times' __author__ = 'Derry FitzGerald' no_stylesheets = True remove_tags = [dict(name='div', attrs={'class':'footer'})] extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }' feeds = [ ('Frontpage', 'http://www.irishtimes.com/feeds/rss/newspaper/index.rss'), ('Ireland', 'http://www.irishtimes.com/feeds/rss/newspaper/ireland.rss'), ('World', 'http://www.irishtimes.com/feeds/rss/newspaper/world.rss'), ('Finance', 'http://www.irishtimes.com/feeds/rss/newspaper/finance.rss'), ('Features', 'http://www.irishtimes.com/feeds/rss/newspaper/features.rss'), ('Sport', 'http://www.irishtimes.com/feeds/rss/newspaper/sport.rss'), ('Opinion', 'http://www.irishtimes.com/feeds/rss/newspaper/opinion.rss'), ('Letters', 'http://www.irishtimes.com/feeds/rss/newspaper/letters.rss'), ('Health', 'http://www.irishtimes.com/feeds/rss/newspaper/health.rss'), ('Education and Parenting', 'http://www.irishtimes.com/feeds/rss/newspaper/education.rss'), ('Science Today', 'http://www.irishtimes.com/feeds/rss/newspaper/sciencetoday.rss'), ('The Ticket', 'http://www.irishtimes.com/feeds/rss/newspaper/theticket.rss'), ('Weekend', 'http://www.irishtimes.com/feeds/rss/newspaper/weekend.rss'), ('News Features', 'http://www.irishtimes.com/feeds/rss/newspaper/newsfeatures.rss'), ('Magazine', 'http://www.irishtimes.com/feeds/rss/newspaper/magazine.rss'), ] def print_version(self, url): return url.replace('.html', '_pf.html') Thanks in advance for any assistance Derry |
08-11-2008, 11:50 AM | #2 |
creator of calibre
Posts: 43,839
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Hmm dont see anything obviously wrong, open a ticket so I can keep track of it. I'm a little busy at the moment.
|
Advert | |
|
08-12-2008, 05:01 AM | #3 |
Member
Posts: 13
Karma: 10
Join Date: Aug 2008
Device: Sony PRS505
|
Hi, thanks for getting back to me, I'll open a ticket now,
there is no problem if you don't get a chance to look at it. Again thanks for the wonderful software Derry |
08-16-2008, 07:45 PM | #4 |
Connoisseur
Posts: 77
Karma: 149999
Join Date: Aug 2008
Location: Ireland
Device: Kobo Glo, Kobo Touch, Kindle PW3
|
Hi Derry,
Thanks for the recipe for the Irish News, I don't suppose you have a recipe for the Derry Journal? |
08-19-2008, 05:08 AM | #5 |
Member
Posts: 13
Karma: 10
Join Date: Aug 2008
Device: Sony PRS505
|
Unfortunately no, I'm a native of Cork, only visited Derry once ever, had a great time!
Glad you liked the recipe, Derry |
Advert | |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Catholic News Recipe Problem | funkgut | Calibre | 4 | 04-23-2010 02:08 PM |
Problem running scripts from ContentLister | Fellball | iRex | 1 | 03-13-2009 08:16 PM |
Fetch News problem in 5 | tmcclell | Calibre | 3 | 03-11-2009 01:06 AM |
Problem with News Feeds | Sydney's Mom | Calibre | 10 | 03-07-2009 02:54 PM |
Fetch News Problem in Calibre 0.4.55 | sriram | Calibre | 4 | 05-21-2008 05:48 PM |