Fix #880946 (Update for RTE News Recipe)

This commit is contained in:
Kovid Goyal 2011-10-24 22:04:21 +05:30
parent 7c7b91c22c
commit fe540ef887

View File

@ -1,15 +1,18 @@
from calibre.web.feeds.news import BasicNewsRecipe
class RTE(BasicNewsRecipe):
title = u'RTE News'
oldest_article = 7
max_articles_per_feed = 100
__author__ = u'Robin Phillips'
language = 'en_IE'
remove_tags = [dict(attrs={'class':['topAd','botad','previousNextItem','headline','footerLinks','footernav']})]
feeds = [(u'News', u'http://www.rte.ie/rss/news.xml'), (u'Sport', u'http://www.rte.ie/rss/sport.xml'), (u'Soccer', u'http://www.rte.ie/rss/soccer.xml'), (u'GAA', u'http://www.rte.ie/rss/gaa.xml'), (u'Rugby', u'http://www.rte.ie/rss/rugby.xml'), (u'Racing', u'http://www.rte.ie/rss/racing.xml'), (u'Business', u'http://www.rte.ie/rss/business.xml'), (u'Entertainment', u'http://www.rte.ie/rss/entertainment.xml')]
def print_version(self, url):
return url.replace('http://www', 'http://m')
from calibre.web.feeds.news import BasicNewsRecipe
class RTE(BasicNewsRecipe):
title = u'RTE News'
oldest_article = 7
max_articles_per_feed = 100
__author__ = u'Robin Phillips, Neil Grogan'
language = 'en_IE'
remove_tags = [dict(attrs={'class':['share','global-return-to-top clearfix','sprite subnav-top-link','related-articles']}),
dict(id=['warning-lofi','masthead', 'nav-sections-menu', 'ad-leaderboard','article-nav']),
dict(name=['header','script', 'footer', 'style'])]
feeds = [(u'News', u'http://www.rte.ie/rss/news.xml'), (u'Sport', u'http://www.rte.ie/rss/sport.xml'), (u'Soccer', u'http://www.rte.ie/rss/soccer.xml'), (u'GAA', u'http://www.rte.ie/rss/gaa.xml'), (u'Rugby', u'http://www.rte.ie/rss/rugby.xml'), (u'Racing', u'http://www.rte.ie/rss/racing.xml'), (u'Business', u'http://www.rte.ie/rss/business.xml'), (u'Entertainment', u'http://www.rte.ie/rss/entertainment.xml')]
def print_version(self, url):
return url.replace('http://www', 'http://m')