From 30f7813171d4c920904d818b0292e423c04c77ef Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 16 Nov 2023 20:11:08 +0530 Subject: [PATCH] pep8 --- recipes/natgeo.recipe | 5 +++-- recipes/toiprint.recipe | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/natgeo.recipe b/recipes/natgeo.recipe index a22e5824b1..adeca894b2 100644 --- a/recipes/natgeo.recipe +++ b/recipes/natgeo.recipe @@ -3,6 +3,7 @@ from __future__ import absolute_import, division, print_function, unicode_literals import json +import re from pprint import pformat from calibre.web.feeds.news import BasicNewsRecipe @@ -48,7 +49,7 @@ def parse_body(item): c = item['cntnt'] if item.get('type') == 'inline': if c.get('cmsType') == 'listicle': - if 'title' in c: + if 'title' in c: yield '

' + escape(c['title']) + '

' yield c['text'] elif c.get('cmsType') == 'image': @@ -56,7 +57,7 @@ def parse_body(item): yield line elif c.get('cmsType') == 'imagegroup': for imgs in c['images']: - for line in parse_lead_image(imgs): + for line in parse_lead_image(imgs): yield line elif c.get('cmsType') == 'pullquote': if 'quote' in c: diff --git a/recipes/toiprint.recipe b/recipes/toiprint.recipe index cb2f42a40d..2d15ef2913 100644 --- a/recipes/toiprint.recipe +++ b/recipes/toiprint.recipe @@ -70,7 +70,6 @@ class toiprint(BasicNewsRecipe): if sec_name == 'Advertisement': continue self.log(sec_name) - articles = [] if 'Articles' in link: for art in link['Articles']: section = sec_name