mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
pep8
This commit is contained in:
parent
d483644f7c
commit
4c7255854d
@ -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:
|
||||||
|
@ -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()}):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user