mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Cleanup previous PR
We cant use walrus operator in recipes as they can potentially run on very old versions of python.
This commit is contained in:
parent
5ee4bc6d9a
commit
ff63cbb75e
@ -24,7 +24,7 @@ class EpochTimes(BasicNewsRecipe):
|
||||
]
|
||||
remove_tags = [
|
||||
classes('print:hidden h-header shortcode aspect-square'),
|
||||
dict(name='button', 'svg'),
|
||||
dict(name=['button', 'svg']),
|
||||
dict(name='img', attrs={'src':lambda x: x and x.endswith('svg')})
|
||||
]
|
||||
|
||||
|
@ -35,7 +35,8 @@ class PhilosophyNow(BasicNewsRecipe):
|
||||
soup = self.index_to_soup('https://philosophynow.org/')
|
||||
div = soup.find('div', attrs={'id': 'aside_issue_cover'})
|
||||
url = div.find('a', href=True)['href']
|
||||
if issue := div.find('div', attrs={'id':'aside_issue_text'}):
|
||||
issue = div.find('div', attrs={'id':'aside_issue_text'})
|
||||
if issue:
|
||||
self.log('Downloading issue:', self.tag_to_string(issue).strip())
|
||||
self.timefmt = ' [' + self.tag_to_string(issue.find(attrs={'id':'aside_issue_date'})) + ']'
|
||||
self.title = 'Philosophy Now ' + self.tag_to_string(issue.find(attrs={'id':'aside_issue_number'}))
|
||||
|
Loading…
x
Reference in New Issue
Block a user