mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
21583ad1d0
commit
28340111d1
@ -37,12 +37,6 @@ class ilCorriereEn(BasicNewsRecipe):
|
|||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
|
|
||||||
def get_article_url(self, article):
|
|
||||||
articleUrl = article.get('link')
|
|
||||||
segments = articleUrl.split('/')
|
|
||||||
basename = '/'.join(segments[:3]) + '/' + \
|
|
||||||
'International/english/articoli/'
|
|
||||||
|
|
||||||
recipe_specific_options = {
|
recipe_specific_options = {
|
||||||
'days': {
|
'days': {
|
||||||
'short': 'Oldest article to download from this news source. In days ',
|
'short': 'Oldest article to download from this news source. In days ',
|
||||||
@ -57,6 +51,12 @@ class ilCorriereEn(BasicNewsRecipe):
|
|||||||
if d and isinstance(d, str):
|
if d and isinstance(d, str):
|
||||||
self.oldest_article = float(d)
|
self.oldest_article = float(d)
|
||||||
|
|
||||||
|
def get_article_url(self, article):
|
||||||
|
articleUrl = article.get('link')
|
||||||
|
segments = articleUrl.split('/')
|
||||||
|
basename = '/'.join(segments[:3]) + '/' + \
|
||||||
|
'International/english/articoli/'
|
||||||
|
|
||||||
# the date has to be redone with the url structure
|
# the date has to be redone with the url structure
|
||||||
mlist1 = ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno',
|
mlist1 = ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno',
|
||||||
'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre']
|
'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre']
|
||||||
|
@ -96,12 +96,6 @@ class elcorreo(BasicNewsRecipe):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
def get_browser(self, *args, **kwargs):
|
def get_browser(self, *args, **kwargs):
|
||||||
kwargs['user_agent'] = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
|
kwargs['user_agent'] = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
|
||||||
br = BasicNewsRecipe.get_browser(self, *args, **kwargs)
|
br = BasicNewsRecipe.get_browser(self, *args, **kwargs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user