Update Entrepreneur

This commit is contained in:
Kovid Goyal 2025-12-09 09:13:57 +05:30
parent 59fd1c6e47
commit d6124f039d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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':