From eda12b15073c811a7de529a98af087f7d7e665b0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 23 Feb 2016 12:06:00 +0530 Subject: [PATCH] Update AsiaOne --- recipes/asia_one.recipe | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/recipes/asia_one.recipe b/recipes/asia_one.recipe index 6457645ce1..7d8c2f4572 100644 --- a/recipes/asia_one.recipe +++ b/recipes/asia_one.recipe @@ -10,25 +10,21 @@ from calibre.web.feeds.news import BasicNewsRecipe class AsiaOne(BasicNewsRecipe): title = u'AsiaOne' - oldest_article = 3 + oldest_article = 2 max_articles_per_feed = 100 __author__ = 'Bruce' description = 'News from Singapore Press Holdings Portal' no_stylesheets = False language = 'en_SG' - + remove_javascript = True remove_tags = [dict(name='span', attrs={'class':'footer'})] - keep_only_tags = [dict(name=['span', 'p', 'br', 'b', 'i', 'hr'])] - - - - feeds = [ - ('News', 'http://www.asiaone.com/a1mborss/News.xml'), - ('Business', 'http://www.asiaone.com/a1mborss/Business.xml'), - ('Education', 'http://www.asiaone.com/a1mborss/Education.xml'), - ('Health', 'http://www.asiaone.com/a1mborss/Health.xml'), - ('Digital', 'http://www.asiaone.com/a1mborss/Digital.xml'), + keep_only_tags = [ + dict(name='h1', attrs={'class':'headline'}), + dict(name='div', attrs={'class':['article-content','person-info row']}) ] - def print_version(self, url): - return url.replace('http://www.asiaone.com/', 'http://www.asiaone.com/print/') + feeds = [ + ('Singapore', 'http://asiaone.feedsportal.com/c/34151/f/618415/index.rss'), + ('Asia', 'http://asiaone.feedsportal.com/c/34151/f/618416/index.rss') + + ]