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
@ -19,25 +19,22 @@ class LiveMint(BasicNewsRecipe):
|
||||
remove_attributes = ['style', 'height', 'width']
|
||||
masthead_url = 'https://images.livemint.com/static/livemint-logo-v1.svg'
|
||||
|
||||
recipe_specific_options = {
|
||||
recipe_specific_options = {
|
||||
'days': {
|
||||
'short': 'Oldest article to download from this news source. In days ',
|
||||
'long': 'For example, 0.5, gives you articles from the past 12 hours',
|
||||
'default': str(oldest_article)
|
||||
}
|
||||
}
|
||||
remove_empty_feeds = True
|
||||
resolve_internal_links = True
|
||||
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
BasicNewsRecipe.__init__(self, *args, **kwargs)
|
||||
d = self.recipe_specific_options.get('days')
|
||||
if d and isinstance(d, str):
|
||||
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'):
|
||||
self.title = 'Mint | ' + date.today().strftime('%b %d, %Y')
|
||||
if is_saturday:
|
||||
|
@ -192,7 +192,6 @@ class NatGeo(BasicNewsRecipe):
|
||||
# self.cover_url = png[0] + '?w=1000&h=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)
|
||||
ans = {}
|
||||
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