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
|
# Get publication date - Next issue on sale date - 12 days
|
||||||
issue_box = soup.find('div', attrs={'id': 'issue-box'})
|
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()
|
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)
|
self.log('next_issue_text:', next_issue_text)
|
||||||
try:
|
try:
|
||||||
day, month, year = next_issue_text.split(' ')
|
day, month, year = next_issue_text.split(' ')
|
||||||
# remove day suffixes e.g. 2nd
|
# remove day suffixes e.g. 2nd
|
||||||
@ -124,7 +124,6 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
|||||||
section = soup.find('div', attrs=section_attrs)
|
section = soup.find('div', attrs=section_attrs)
|
||||||
|
|
||||||
if not section:
|
if not section:
|
||||||
self.log("section not found:", section_id)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for a in section.findAll('a', href=True):
|
for a in section.findAll('a', href=True):
|
||||||
@ -141,7 +140,7 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
|||||||
url = self.base_url + url
|
url = self.base_url + url
|
||||||
if url in urls:
|
if url in urls:
|
||||||
continue
|
continue
|
||||||
self.log("title:", title, ", url:", url)
|
self.log('title:', title, ', url:', url)
|
||||||
urls.append(url)
|
urls.append(url)
|
||||||
articles.append({
|
articles.append({
|
||||||
'title': title,
|
'title': title,
|
||||||
|
@ -53,8 +53,8 @@ class Reuters(BasicNewsRecipe):
|
|||||||
'default': '480',
|
'default': '480',
|
||||||
},
|
},
|
||||||
'spr': {
|
'spr': {
|
||||||
'short': 'Include Sports sections?'
|
'short': 'Include Sports sections?',
|
||||||
'long':'Yes/No'
|
'long':'Yes/No',
|
||||||
'default': 'No'
|
'default': 'No'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user