From 4ba6efed597b17f16701788f27e8216dee49c3ad Mon Sep 17 00:00:00 2001 From: unkn0wn <51942695+unkn0w7n@users.noreply.github.com> Date: Mon, 12 May 2025 13:29:04 +0530 Subject: [PATCH 1/2] Update business_standard_print.recipe fix paras --- recipes/business_standard_print.recipe | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/business_standard_print.recipe b/recipes/business_standard_print.recipe index e30be98bfc..b9f9e33092 100644 --- a/recipes/business_standard_print.recipe +++ b/recipes/business_standard_print.recipe @@ -171,8 +171,8 @@ class BusinessStandardPrint(BasicNewsRecipe): for attr in self.remove_attributes: for x in soup.findAll(attrs={attr: True}): del x[attr] - for br in soup.findAll('small', attrs={'class': 'brtag'}): - br.clear() - brtag = soup.new_tag('br') - br.replace_with(brtag) + for br in soup.findAll(attrs={'class': lambda x: x and x.startswith('brtag')}): + if pa := br.find_parent('div'): + pa.name = 'p' + br.extract() return soup From 2aebeda6b77963d7ba6d34e16cc4a29494123506 Mon Sep 17 00:00:00 2001 From: unkn0wn <51942695+unkn0w7n@users.noreply.github.com> Date: Mon, 12 May 2025 13:29:32 +0530 Subject: [PATCH 2/2] Update business_standard.recipe --- recipes/business_standard.recipe | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/business_standard.recipe b/recipes/business_standard.recipe index 3d546002c4..e3fa2ad597 100644 --- a/recipes/business_standard.recipe +++ b/recipes/business_standard.recipe @@ -158,8 +158,8 @@ class BusinessStandard(BasicNewsRecipe): for attr in self.remove_attributes: for x in soup.findAll(attrs={attr: True}): del x[attr] - for br in soup.findAll('small', attrs={'class': 'brtag'}): - br.clear() - brtag = soup.new_tag('br') - br.replace_with(brtag) + for br in soup.findAll(attrs={'class': lambda x: x and x.startswith('brtag')}): + if pa := br.find_parent('div'): + pa.name = 'p' + br.extract() return soup