This commit is contained in:
Kovid Goyal 2025-05-12 13:32:19 +05:30
commit 4b884413f5
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 8 additions and 8 deletions

View File

@ -158,8 +158,8 @@ class BusinessStandard(BasicNewsRecipe):
for attr in self.remove_attributes: for attr in self.remove_attributes:
for x in soup.findAll(attrs={attr: True}): for x in soup.findAll(attrs={attr: True}):
del x[attr] del x[attr]
for br in soup.findAll('small', attrs={'class': 'brtag'}): for br in soup.findAll(attrs={'class': lambda x: x and x.startswith('brtag')}):
br.clear() if pa := br.find_parent('div'):
brtag = soup.new_tag('br') pa.name = 'p'
br.replace_with(brtag) br.extract()
return soup return soup

View File

@ -171,8 +171,8 @@ class BusinessStandardPrint(BasicNewsRecipe):
for attr in self.remove_attributes: for attr in self.remove_attributes:
for x in soup.findAll(attrs={attr: True}): for x in soup.findAll(attrs={attr: True}):
del x[attr] del x[attr]
for br in soup.findAll('small', attrs={'class': 'brtag'}): for br in soup.findAll(attrs={'class': lambda x: x and x.startswith('brtag')}):
br.clear() if pa := br.find_parent('div'):
brtag = soup.new_tag('br') pa.name = 'p'
br.replace_with(brtag) br.extract()
return soup return soup