From d6124f039d9e39ff7fc101b092a521fa37a2f9ee Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 9 Dec 2025 09:13:57 +0530 Subject: [PATCH] Update Entrepreneur --- recipes/entrepeneur.recipe | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/entrepeneur.recipe b/recipes/entrepeneur.recipe index 5a95f204f3..e07d97f103 100644 --- a/recipes/entrepeneur.recipe +++ b/recipes/entrepeneur.recipe @@ -23,10 +23,10 @@ class EntrepeneurMagRecipe(BasicNewsRecipe): remove_javascript = True keep_only_tags = [ - dict(attrs={'data-word-count': True}), + dict(name='article', id=lambda x: x and x.startswith('post-')), ] remove_tags = [ - dict(attrs={'class': ['related-content']}), + dict(attrs={'class': ['related-content', 'icon']}), ] remove_attributes = ['style'] @@ -36,9 +36,9 @@ class EntrepeneurMagRecipe(BasicNewsRecipe): soup = self.index_to_soup(self.INDEX + '/latest') articles = [] for h3 in soup.findAll('h3'): - a = h3.parent - if a.name == 'a' and a.get('href'): - url = self.INDEX + a['href'] + a = h3.find('a') + if a and a.get('href'): + url = a['href'] title = self.tag_to_string(h3) desc = '' if a.next_sibling and a.next_sibling.name == 'p':