mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
flake8 fixes
This commit is contained in:
parent
c1268ada46
commit
9117dcc471
@ -100,8 +100,8 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
||||
|
||||
# Get publication date - Next issue on sale date - 12 days
|
||||
issue_box = soup.find('div', attrs={'id': 'issue-box'})
|
||||
next_issue_text = issue_box.find(text=re.compile('NEXT\s+ISSUE')).parent.contents[-1].strip()
|
||||
self.log("next_issue_text:", next_issue_text)
|
||||
next_issue_text = issue_box.find(text=re.compile(r'NEXT\s+ISSUE')).parent.contents[-1].strip()
|
||||
self.log('next_issue_text:', next_issue_text)
|
||||
try:
|
||||
day, month, year = next_issue_text.split(' ')
|
||||
# remove day suffixes e.g. 2nd
|
||||
@ -124,7 +124,6 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
||||
section = soup.find('div', attrs=section_attrs)
|
||||
|
||||
if not section:
|
||||
self.log("section not found:", section_id)
|
||||
continue
|
||||
|
||||
for a in section.findAll('a', href=True):
|
||||
@ -141,7 +140,7 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
||||
url = self.base_url + url
|
||||
if url in urls:
|
||||
continue
|
||||
self.log("title:", title, ", url:", url)
|
||||
self.log('title:', title, ', url:', url)
|
||||
urls.append(url)
|
||||
articles.append({
|
||||
'title': title,
|
||||
|
@ -53,8 +53,8 @@ class Reuters(BasicNewsRecipe):
|
||||
'default': '480',
|
||||
},
|
||||
'spr': {
|
||||
'short': 'Include Sports sections?'
|
||||
'long':'Yes/No'
|
||||
'short': 'Include Sports sections?',
|
||||
'long':'Yes/No',
|
||||
'default': 'No'
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user