From 4d7bab28b6879c569d9ffb3e6cbde673dc688738 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Tue, 7 Dec 2010 07:37:08 +0900 Subject: [PATCH] recipe: toyokeizai: add description about limit --- resources/recipes/toyokeizai.recipe | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/resources/recipes/toyokeizai.recipe b/resources/recipes/toyokeizai.recipe index 7145ece707..3aed2b2202 100644 --- a/resources/recipes/toyokeizai.recipe +++ b/resources/recipes/toyokeizai.recipe @@ -8,13 +8,13 @@ from calibre.web.feeds.news import BasicNewsRecipe import re class Toyokeizai(BasicNewsRecipe): - title = u'ToyoKeizai' + title = u'ToyoKeizai News' __author__ = 'Hiroshi Miura' oldest_article = 1 max_articles_per_feed = 50 - description = 'Japanese traditional financial and business magazine' + description = 'Japanese traditional economy and business magazine, only for advanced subscribers supported' publisher = 'Toyokeizai Shinbun Sha' - category = 'news, japan' + category = 'economy, magazine, japan' language = 'ja' encoding = 'euc-jp' index = 'http://www.toyokeizai.net/news/' @@ -40,7 +40,7 @@ class Toyokeizai(BasicNewsRecipe): itemd = itt.find('span') newsarticles.append({ 'title' :itema.string - ,'date' :re.compile(r"\- ").sub(" ",itemd.string) + ,'date' :re.compile(r"\- ").sub("",itemd.string) ,'url' :'http://www.toyokeizai.net' + itema['href'] # ,'description':itema['title'] ,'description':'' @@ -58,4 +58,9 @@ class Toyokeizai(BasicNewsRecipe): res = br.submit() return br + def is_link_wanted(url,tag): + if re.compile(r'page//[0-9]+//$').search(url): + return True + return False +