From 0f52676e4f02762c27ef5876dc4045368cccb7a2 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Thu, 27 Mar 2025 22:22:05 +0530 Subject: [PATCH] ... --- recipes/ap.recipe | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/ap.recipe b/recipes/ap.recipe index b3f809fe33..79ab9592fe 100644 --- a/recipes/ap.recipe +++ b/recipes/ap.recipe @@ -28,14 +28,14 @@ class AssociatedPress(BasicNewsRecipe): classes('StoryPage-lede-content Page-lead Page-byline-info RichTextStoryBody'), ] remove_tags = [ - classes('displayNone Advertisement HTMLModuleEnhancement videoSlide'), + classes('displayNone Advertisement HTMLModuleEnhancement AudioEnhancement'), dict( name=[ 'source', 'button', 'svg', 'template', - 'bsp-jw-player', + 'video', 'astro-island', 'iframe', 'document', @@ -64,6 +64,9 @@ class AssociatedPress(BasicNewsRecipe): return [('Articles', feeds)] 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')): if p := st.find('p'): p.name = 'span'