mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
6833c07410
commit
0f52676e4f
@ -28,14 +28,14 @@ class AssociatedPress(BasicNewsRecipe):
|
|||||||
classes('StoryPage-lede-content Page-lead Page-byline-info RichTextStoryBody'),
|
classes('StoryPage-lede-content Page-lead Page-byline-info RichTextStoryBody'),
|
||||||
]
|
]
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
classes('displayNone Advertisement HTMLModuleEnhancement videoSlide'),
|
classes('displayNone Advertisement HTMLModuleEnhancement AudioEnhancement'),
|
||||||
dict(
|
dict(
|
||||||
name=[
|
name=[
|
||||||
'source',
|
'source',
|
||||||
'button',
|
'button',
|
||||||
'svg',
|
'svg',
|
||||||
'template',
|
'template',
|
||||||
'bsp-jw-player',
|
'video',
|
||||||
'astro-island',
|
'astro-island',
|
||||||
'iframe',
|
'iframe',
|
||||||
'document',
|
'document',
|
||||||
@ -64,6 +64,9 @@ class AssociatedPress(BasicNewsRecipe):
|
|||||||
return [('Articles', feeds)]
|
return [('Articles', feeds)]
|
||||||
|
|
||||||
def preprocess_html(self, soup):
|
def preprocess_html(self, soup):
|
||||||
|
for v in soup.findAll('bsp-jw-player', attrs={'poster': True}):
|
||||||
|
v.name = 'img'
|
||||||
|
v.attrs = {'src': v.get('poster', '')}
|
||||||
for st in soup.findAll(**classes('CarouselSlide-infoDescription')):
|
for st in soup.findAll(**classes('CarouselSlide-infoDescription')):
|
||||||
if p := st.find('p'):
|
if p := st.find('p'):
|
||||||
p.name = 'span'
|
p.name = 'span'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user