mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
32818883bd
commit
3f8050f8cf
@ -34,11 +34,11 @@ class Espresso(BasicNewsRecipe):
|
||||
use_embedded_content = False
|
||||
masthead_url = 'https://www.livemint.com/lm-img/dev/economist-logo-oneline.png'
|
||||
|
||||
extra_css = """
|
||||
extra_css = '''
|
||||
h1 { text-align:center; }
|
||||
._main-image, ._description, .sub, .calibre-nuked-tag-figcaption { text-align:center; font-size:small; }
|
||||
._quote-container { font-size:x-large; font-style:italic; color:#202020; }
|
||||
"""
|
||||
'''
|
||||
|
||||
keep_only_tags = [dict(name='main', attrs={'id': 'content'})]
|
||||
|
||||
|
@ -79,7 +79,7 @@ class Fokus(BasicNewsRecipe):
|
||||
response = browser.open(req)
|
||||
|
||||
# Parse the response into a BeautifulSoup soup.
|
||||
soup = BeautifulSoup(response.get_data(), "html.parser")
|
||||
soup = BeautifulSoup(response.get_data(), 'html.parser')
|
||||
|
||||
# The cover image of the current edition is located in a <figure> tag with class 'Issue__thumbnail'.
|
||||
try:
|
||||
@ -88,7 +88,7 @@ class Fokus(BasicNewsRecipe):
|
||||
# Set the `img_tag` to `None` if it is falsy. This way, we can force an `AttributeError` if no cover URL
|
||||
# can be found.
|
||||
img_tag = img_tag if img_tag else None
|
||||
cover_url = img_tag["src"]
|
||||
cover_url = img_tag['src']
|
||||
except AttributeError:
|
||||
self.log.error("Failed to identify the cover image URL. Does an 'Issue__thumbnail' figure still exist?")
|
||||
return ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user