From bedcdac5fb3551f1d5a9e0c9b2367a43f0ea085f Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 21 Nov 2010 21:33:44 +0900 Subject: [PATCH] add reuters japan recipe fix recipe names - nikkei news - mainichi news --- resources/recipes/mainichi.recipe | 2 +- resources/recipes/mainichi_it_news.recipe | 2 +- resources/recipes/nikkei_sub_economy.recipe | 2 +- resources/recipes/nikkei_sub_industry.recipe | 2 +- resources/recipes/nikkei_sub_life.recipe | 2 +- resources/recipes/reuters_ja.recipe | 25 ++++++++++++++++++++ 6 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 resources/recipes/reuters_ja.recipe diff --git a/resources/recipes/mainichi.recipe b/resources/recipes/mainichi.recipe index 510c03a333..552e81bef5 100644 --- a/resources/recipes/mainichi.recipe +++ b/resources/recipes/mainichi.recipe @@ -20,5 +20,5 @@ class MainichiDailyNews(BasicNewsRecipe): remove_tags_before = {'class':"NewsTitle"} remove_tags = [{'class':"RelatedArticle"}] - remove_tags_after = {'class':"ArticleLower"} + remove_tags_after = {'class':"Credit"} diff --git a/resources/recipes/mainichi_it_news.recipe b/resources/recipes/mainichi_it_news.recipe index ce0b11f77e..49ab104bff 100644 --- a/resources/recipes/mainichi_it_news.recipe +++ b/resources/recipes/mainichi_it_news.recipe @@ -12,5 +12,5 @@ class MainichiDailyITNews(BasicNewsRecipe): remove_tags_before = {'class':"NewsTitle"} remove_tags = [{'class':"RelatedArticle"}] - remove_tags_after = {'class':"ArticleLower"} + remove_tags_after = {'class':"Credit"} diff --git a/resources/recipes/nikkei_sub_economy.recipe b/resources/recipes/nikkei_sub_economy.recipe index 0ec21f5571..764ad7d008 100644 --- a/resources/recipes/nikkei_sub_economy.recipe +++ b/resources/recipes/nikkei_sub_economy.recipe @@ -14,7 +14,7 @@ from calibre.ptempfile import PersistentTemporaryFile class NikkeiNet_sub_economy(BasicNewsRecipe): - title = u'\u65e5\u7d4c\u65b0\u805e\u96fb\u5b50\u7248(Sports)' + title = u'\u65e5\u7d4c\u65b0\u805e\u96fb\u5b50\u7248(Economy)' __author__ = 'Hiroshi Miura' description = 'News and current market affairs from Japan' needs_subscription = True diff --git a/resources/recipes/nikkei_sub_industry.recipe b/resources/recipes/nikkei_sub_industry.recipe index 5c8a7adb70..cfcf92b805 100644 --- a/resources/recipes/nikkei_sub_industry.recipe +++ b/resources/recipes/nikkei_sub_industry.recipe @@ -14,7 +14,7 @@ from calibre.ptempfile import PersistentTemporaryFile class NikkeiNet_sub_industory(BasicNewsRecipe): - title = u'\u65e5\u7d4c\u65b0\u805e\u96fb\u5b50\u7248(Sports)' + title = u'\u65e5\u7d4c\u65b0\u805e\u96fb\u5b50\u7248(Industory)' __author__ = 'Hiroshi Miura' description = 'News and current market affairs from Japan' needs_subscription = True diff --git a/resources/recipes/nikkei_sub_life.recipe b/resources/recipes/nikkei_sub_life.recipe index 00fe053ac9..65a32eecac 100644 --- a/resources/recipes/nikkei_sub_life.recipe +++ b/resources/recipes/nikkei_sub_life.recipe @@ -14,7 +14,7 @@ from calibre.ptempfile import PersistentTemporaryFile class NikkeiNet_sub_life(BasicNewsRecipe): - title = u'\u65e5\u7d4c\u65b0\u805e\u96fb\u5b50\u7248(Sports)' + title = u'\u65e5\u7d4c\u65b0\u805e\u96fb\u5b50\u7248(Life)' __author__ = 'Hiroshi Miura' description = 'News and current market affairs from Japan' needs_subscription = True diff --git a/resources/recipes/reuters_ja.recipe b/resources/recipes/reuters_ja.recipe new file mode 100644 index 0000000000..d926c29096 --- /dev/null +++ b/resources/recipes/reuters_ja.recipe @@ -0,0 +1,25 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class ReutersJa(BasicNewsRecipe): + + title = 'Reuters(Japan)' + description = 'Global news in Japanese' + __author__ = 'Hiroshi Miura' + use_embedded_content = False + language = 'ja' + max_articles_per_feed = 10 + remove_javascript = True + + feeds = [ ('Top Stories', 'http://feeds.reuters.com/reuters/JPTopNews?format=xml'), + ('World News', 'http://feeds.reuters.com/reuters/JPWorldNews?format=xml'), + ('Business News', 'http://feeds.reuters.com/reuters/JPBusinessNews?format=xml'), + ('Technology News', 'http://feeds.reuters.com/reuters/JPTechnologyNews?format=xml'), + ('Oddly Enough News', 'http://feeds.reuters.com/reuters/JPOddlyEnoughNews?format=xml') + ] + + remove_tags_before = {'class':"article primaryContent"} + remove_tags = [ dict(id="banner"), + dict(id="autilities"), + dict(id="textSizer") + ] + remove_tags_after = dict(id="copyrightNotice")