From 955759132173ddf7421b3687a9f12cf3f455e66f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 6 Aug 2020 08:32:52 +0530 Subject: [PATCH] Update Science News Recent Issues --- recipes/science_news.recipe | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/recipes/science_news.recipe b/recipes/science_news.recipe index df1217a083..e39bc95ff1 100644 --- a/recipes/science_news.recipe +++ b/recipes/science_news.recipe @@ -28,10 +28,16 @@ class ScienceNewsIssue(BasicNewsRecipe): auto_cleanup = False keep_only_tags = [ - dict(name="h1", attrs={'itemprop': 'headline'}), - dict(name="div", attrs={'property': 'rnews:articlebody schema:articleBody'}), - dict(name="div", attrs={'itemprop': 'author'}), + dict(attrs={'class': lambda x: x and ( + 'single__content___' in x or 'header-default__title___' in x or + 'header-default__deck___' in x or 'header-default__figure___' in x + )}) + ] + remove_tags = [ + dict(attrs={'class': lambda x: x and ( + 'newsletter-signup__wrapper___' in x + )}) ] feeds = [(u"Science News Headlines", - u'https://www.sciencenews.org/feeds/headlines.rss')] + u'https://www.sciencenews.org/feed')]