This commit is contained in:
Kovid Goyal 2024-07-22 11:17:58 +05:30
parent d483644f7c
commit 4c7255854d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 8 deletions

View File

@ -26,18 +26,15 @@ class LiveMint(BasicNewsRecipe):
'default': str(oldest_article) 'default': str(oldest_article)
} }
} }
remove_empty_feeds = True
resolve_internal_links = True
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
BasicNewsRecipe.__init__(self, *args, **kwargs) BasicNewsRecipe.__init__(self, *args, **kwargs)
d = self.recipe_specific_options.get('days') d = self.recipe_specific_options.get('days')
if d and isinstance(d, str): if d and isinstance(d, str):
self.oldest_article = float(d) self.oldest_article = float(d)
remove_empty_feeds = True
resolve_internal_links = True
def __init__(self, *args, **kwargs):
BasicNewsRecipe.__init__(self, *args, **kwargs)
if self.output_profile.short_name.startswith('kindle'): if self.output_profile.short_name.startswith('kindle'):
self.title = 'Mint | ' + date.today().strftime('%b %d, %Y') self.title = 'Mint | ' + date.today().strftime('%b %d, %Y')
if is_saturday: if is_saturday:

View File

@ -192,7 +192,6 @@ class NatGeo(BasicNewsRecipe):
# self.cover_url = png[0] + '?w=1000&h=1000' # self.cover_url = png[0] + '?w=1000&h=1000'
self.cover_url = soup.find('meta', attrs={'property':'og:image'})['content'].split('?')[0] + '?w=1000' self.cover_url = soup.find('meta', attrs={'property':'og:image'})['content'].split('?')[0] + '?w=1000'
name = soup.find(attrs={'class':lambda x: x and 'Header__Description' in x.split()})
# self.title = 'National Geographic ' + self.tag_to_string(name) # self.title = 'National Geographic ' + self.tag_to_string(name)
ans = {} ans = {}
if photoart := soup.find(attrs={'class':lambda x: x and 'BgImagePromo__Container__Text__Link' in x.split()}): if photoart := soup.find(attrs={'class':lambda x: x and 'BgImagePromo__Container__Text__Link' in x.split()}):