diff --git a/recipes/wash_post.recipe b/recipes/wash_post.recipe index 49a629b6b8..09e06c1177 100644 --- a/recipes/wash_post.recipe +++ b/recipes/wash_post.recipe @@ -93,7 +93,11 @@ class TheWashingtonPost(BasicNewsRecipe): ('Commanders', 'http://feeds.washingtonpost.com/rss/sports/redskins'), ] - def preprocess_raw_html(self, raw, *a): + def preprocess_raw_html(self, raw, url): + if '/interactive/' in url: + return ('

' + root.xpath('//h1')[0].text + '

' + 'This article is supposed to be read in a browser.' + '
') root = parse(raw) m = root.xpath('//script[@id="__NEXT_DATA__"]') @@ -102,10 +106,7 @@ class TheWashingtonPost(BasicNewsRecipe): text = data.get('label', {}).get('basic', {}).get('text', '') label = f'

{text}

' if text else '' - if data.get('headlines'): - title = '

' + data['headlines']['basic'] + '

' - elif data.get('metadata'): - title = '

' + data['metadata']['headlines']['basic'] + '

' + title = '

' + data['headlines']['basic'] + '

' subhead = '

' + data['description'].get('basic', '') + '' promo_img = ''