From 5e9759125574b1cc9f5793173156c547d1cb8a33 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:00:46 +0530 Subject: [PATCH] ... --- recipes/economist_espresso.recipe | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/economist_espresso.recipe b/recipes/economist_espresso.recipe index abbc934b32..7ff511ef26 100644 --- a/recipes/economist_espresso.recipe +++ b/recipes/economist_espresso.recipe @@ -44,7 +44,6 @@ class Espresso(BasicNewsRecipe): remove_tags = [ classes('_podcast-promo _newsletter-promo-container _time-last-updated'), - dict(attrs={'data-test-id': 'twib-audio-player'}), ] def parse_index(self): @@ -70,7 +69,10 @@ class Espresso(BasicNewsRecipe): hr.append(nt) for img in soup.findAll('img', src=True): img['src'] = re.sub(r'width=\d+', 'width=600', img['src']) - + if aud := soup.find(attrs={'data-test-id': 'twib-audio-player'}): + if div := aud.find_next('div'): + div.extract() + aud.extract() return soup def get_browser(self, *args, **kwargs):