diff --git a/recipes/business_standard_print.recipe b/recipes/business_standard_print.recipe index c2d1afbbf5..f4dc6d6de1 100644 --- a/recipes/business_standard_print.recipe +++ b/recipes/business_standard_print.recipe @@ -131,13 +131,16 @@ class BusinessStandardPrint(BasicNewsRecipe): if 'alt_text' in data['featuredImageObj']: caption = '' + data['featuredImageObj']['alt_text'] + '

' - body = data['htmlContent'].replace('
\r\n\t\t ', '
') + body = data['htmlContent'] return '' + cat + title + subhead + auth + lede + caption + '

' + body + '
' def preprocess_html(self, soup): for img in soup.findAll('img'): img.attrs = {'src': img.get('src', '')} - for x in soup.findAll('div'): + for x in soup.findAll('div', 'p'): x.attrs = {'class': x.get('class', '')} + for attr in self.remove_attributes: + for x in soup.findAll(attrs={attr: True}): + del x[attr] return soup