From b018850f247d73baf2f93ba65fa99e098443d22c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 1 May 2019 13:31:43 +0530 Subject: [PATCH] Update Boston Globe Subscription --- recipes/boston.com.recipe | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/recipes/boston.com.recipe b/recipes/boston.com.recipe index 9f3fe59065..664cc70771 100644 --- a/recipes/boston.com.recipe +++ b/recipes/boston.com.recipe @@ -28,12 +28,19 @@ class BostonGlobeSubscription(BasicNewsRecipe): timefmt = ' [%a, %d %b, %Y]' needs_subscription = 'optional' keep_only_tags = [ + dict(attrs={'class': lambda x: x and ( + x.startswith('headline |') or x.startswith('subheader |') or + x.startswith('byline |') or x.startswith('image |') or + x.startswith('lead |') or x.startswith('body |') + )}), classes('comic article__title methode__story article-header__headline lead-media figure article-header__byline article-content'), ] remove_tags = [ - classes('inline-newsletter ad skip-nav article-footer'), + classes('inline-newsletter ad skip-nav article-footer sharebar'), + dict(id='continue_button'), dict(name=['meta', 'link']) ] + remove_tags_after = dict(attrs={'class': lambda x:x and x.startswith('body |')}) remove_attributes = ['style'] no_stylesheets = True # simultaneous_downloads = 1