Improved recipe for Newsweek

This commit is contained in:
Kovid Goyal 2009-12-14 16:48:36 -07:00
parent 4b413dfef3
commit 093404e208

View File

@ -33,19 +33,21 @@ class Newsweek(BasicNewsRecipe):
language = 'en' language = 'en'
remove_tags = [ remove_tags = [
{'class':['fwArticle noHr','fwArticle','subinfo','hdlBulletItem','head-content','navbar','link', 'ad', 'sponsorLinksArticle', 'mm-content', {'class':['fwArticle noHr','fwArticle','hdlBulletItem','head-content','navbar','link', 'ad', 'sponsorLinksArticle', 'mm-content',
'inline-social-links-wrapper', 'email-article','ToolBox', 'inline-social-links-wrapper', 'email-article','ToolBox',
'inline-promo-link', 'sponsorship',
'inlineComponentRight', 'inlineComponentRight',
'comments-and-social-links-wrapper', 'EmailArticleBlock']}, 'comments-and-social-links-wrapper', 'EmailArticleBlock']},
{'id' : ['footer', 'ticker-data', 'topTenVertical', {'id' : ['footer', 'ticker-data', 'topTenVertical',
'digg-top-five', 'mesothorax', 'nw-comments', 'digg-top-five', 'mesothorax', 'nw-comments', 'my-take-landing',
'ToolBox', 'EmailMain']}, 'ToolBox', 'EmailMain']},
{'class': re.compile('related-cloud')}, {'class': re.compile('related-cloud')},
dict(name='li', attrs={'id':['slug_bigbox']}) dict(name='li', attrs={'id':['slug_bigbox']})
] ]
keep_only_tags = [{'class':['article HorizontalHeader', 'articlecontent','photoBox']}, ] keep_only_tags = [{'class':['article HorizontalHeader',
'articlecontent','photoBox', 'article columnist first']}, ]
recursions = 1 recursions = 1
match_regexps = [r'http://www.newsweek.com/id/\S+/page/\d+'] match_regexps = [r'http://www.newsweek.com/id/\S+/page/\d+']