diff --git a/recipes/economist_espresso.recipe b/recipes/economist_espresso.recipe index bb0cae2bf0..0736cdbf62 100644 --- a/recipes/economist_espresso.recipe +++ b/recipes/economist_espresso.recipe @@ -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'})] diff --git a/recipes/fokus.recipe b/recipes/fokus.recipe index 1067204753..9493541727 100644 --- a/recipes/fokus.recipe +++ b/recipes/fokus.recipe @@ -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
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 ''