mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update scientific_american.recipe
remove p tags in captions
This commit is contained in:
parent
16b64d1932
commit
c33d89f0c5
@ -44,6 +44,12 @@ class ScientificAmerican(BasicNewsRecipe):
|
|||||||
dict(name=['button', 'svg', 'iframe', 'source'])
|
dict(name=['button', 'svg', 'iframe', 'source'])
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
for fig in soup.findAll('figcaption'):
|
||||||
|
for p in fig.findAll('p'):
|
||||||
|
p.name = 'span'
|
||||||
|
return soup
|
||||||
|
|
||||||
def get_browser(self, *args):
|
def get_browser(self, *args):
|
||||||
br = BasicNewsRecipe.get_browser(self)
|
br = BasicNewsRecipe.get_browser(self)
|
||||||
if self.username and self.password:
|
if self.username and self.password:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user