From 17cc00814886353ecfb6893c7ce6aa1bce66257b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 13 Jul 2018 08:13:02 +0530 Subject: [PATCH] pep8 --- recipes/elcohetealaluna.recipe | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/recipes/elcohetealaluna.recipe b/recipes/elcohetealaluna.recipe index a0e3919d35..1ff45144b5 100644 --- a/recipes/elcohetealaluna.recipe +++ b/recipes/elcohetealaluna.recipe @@ -9,6 +9,7 @@ www.elcohetealaluna.com from calibre.web.feeds.news import BasicNewsRecipe + class elcohetealaluna(BasicNewsRecipe): title = 'El Cohete a la Luna' __author__ = 'Darko Miletic' @@ -26,7 +27,7 @@ class elcohetealaluna(BasicNewsRecipe): resolve_internal_links = True compress_news_images = True masthead_url = 'https://www.elcohetealaluna.com/wp-content/uploads/2018/06/logo-menu.png' - + extra_css = """ body{font-family: Georgia, Times, "Times New Roman", serif} h1,h2,.post-author-name{font-family: Oswald, sans-serif} @@ -46,8 +47,6 @@ class elcohetealaluna(BasicNewsRecipe): feeds = [(u'Articulos', u'https://www.elcohetealaluna.com/feed/')] def preprocess_html(self, soup): - for image in soup.findAll(name='img'): - if image.has_key('data-src'): - image['src'] = image['data-src'] + for image in soup.findAll(name='img', attrs={'data-src': True}): + image['src'] = image['data-src'] return soup -