From d5216c9e101d063ecaeb4abec272482b231c14af Mon Sep 17 00:00:00 2001 From: David Motsonashvili Date: Thu, 14 May 2015 12:06:48 -0700 Subject: [PATCH] Update theonion.recipe fix to get articles after the website redesign --- recipes/theonion.recipe | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/theonion.recipe b/recipes/theonion.recipe index 891259239d..8f4c6d3e16 100644 --- a/recipes/theonion.recipe +++ b/recipes/theonion.recipe @@ -22,6 +22,7 @@ class TheOnion(BasicNewsRecipe): publication_type = 'newsportal' needs_subscription = 'optional' masthead_url = 'http://www.theonion.com/static/onion/img/logo_1x.png' + cover_url = 'http://www.theonion.com/static/onion/img/logo_1x.png' extra_css = """ body{font-family: Helvetica,Arial,sans-serif} .section_title{color: gray; text-transform: uppercase} @@ -38,11 +39,13 @@ class TheOnion(BasicNewsRecipe): , 'language' : language } - keep_only_tags = [dict(attrs={'class':'full-article'})] + keep_only_tags = [dict(attrs={'class':lambda x: x and 'content-wrapper' in x.split()})] remove_attributes = ['lang','rel'] remove_tags = [ - dict(name=['object','link','iframe','base','meta']) + dict(name=['object','link','iframe','base','meta','button','footer','blockquote','figcaption']) ,dict(attrs={'class':lambda x: x and 'share-tools' in x.split()}) + ,dict(attrs={'class':lambda x: x and 'content-meta' in x.split()}) + ,dict(attrs={'class':'below-article-tools'}) ,dict(name='div', attrs={'id':['topshare', 'bottomshare']}) ]