diff --git a/resources/recipes/jijinews.recipe b/resources/recipes/jijinews.recipe index f74864365d..4af242063e 100644 --- a/resources/recipes/jijinews.recipe +++ b/resources/recipes/jijinews.recipe @@ -17,10 +17,19 @@ class JijiDotCom(BasicNewsRecipe): encoding = 'utf-8' oldest_article = 6 max_articles_per_feed = 100 + encoding = 'EUC_JP' language = 'ja' - cover_url = 'http://www.jiji.com/img/top_header_logo2.gif' masthead_url = 'http://jen.jiji.com/images/logo_jijipress.gif' + top_url = 'http://www.jiji.com/' feeds = [(u'\u30cb\u30e5\u30fc\u30b9', u'http://www.jiji.com/rss/ranking.rdf')] remove_tags_after = dict(id="ad_google") + def get_cover_url(self): + cover_url = 'http://www.jiji.com/img/top_header_logo2.gif' + soup = self.index_to_soup(self.top_url) + cover_item = soup.find('div', attrs={'class':'top-pad-photos'}) + if cover_item: + cover_url = self.top_url + cover_item.img['src'] + return cover_url + diff --git a/resources/recipes/msnsankei.recipe b/resources/recipes/msnsankei.recipe index 4c79771945..8c78ccd9e9 100644 --- a/resources/recipes/msnsankei.recipe +++ b/resources/recipes/msnsankei.recipe @@ -1,4 +1,3 @@ -#!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = '2010, Hiroshi Miura ' @@ -16,9 +15,13 @@ class MSNSankeiNewsProduct(BasicNewsRecipe): max_articles_per_feed = 100 encoding = 'Shift_JIS' language = 'ja' + cover_url = 'http://sankei.jp.msn.com/images/common/sankeShinbunLogo.jpg' + masthead_url = 'http://sankei.jp.msn.com/images/common/sankeiNewsLogo.gif' feeds = [(u'\u65b0\u5546\u54c1', u'http://sankei.jp.msn.com/rss/news/release.xml')] remove_tags_before = dict(id="__r_article_title__") remove_tags_after = dict(id="ajax_release_news") - remove_tags = [{'class':"parent chromeCustom6G"}] + remove_tags = [{'class':"parent chromeCustom6G"}, + {'class':"RelatedImg"} + ] diff --git a/resources/recipes/nikkei_sub_main.recipe b/resources/recipes/nikkei_sub_main.recipe index 142edf624d..37fc8964c4 100644 --- a/resources/recipes/nikkei_sub_main.recipe +++ b/resources/recipes/nikkei_sub_main.recipe @@ -30,6 +30,9 @@ class NikkeiNet_sub_main(BasicNewsRecipe): {'class':"JSID_basePageMove JSID_baseAsyncSubmit cmn-form_area JSID_optForm_utoken"}, {'class':"cmn-article_keyword cmn-clearfix"}, {'class':"cmn-print_headline cmn-clearfix"}, + {'class':"cmn-article_list"}, + {'class':"cmn-dashedline"}, + {'class':"cmn-hide"}, ] remove_tags_after = {'class':"cmn-pr_list"}