mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/unkn0w7n/calibre
This commit is contained in:
commit
4b884413f5
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user