From 522e439115e5b78491da54db925ea0394470392c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 9 Jul 2010 14:31:51 -0600 Subject: [PATCH] News download: Fix regression that broke processing of some embedded content feeds. Fixes #6071 (Techdirt feed does not properly list all articles) --- src/calibre/web/feeds/templates.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/web/feeds/templates.py b/src/calibre/web/feeds/templates.py index 1b2ba11e9c..6d6d381040 100644 --- a/src/calibre/web/feeds/templates.py +++ b/src/calibre/web/feeds/templates.py @@ -70,7 +70,10 @@ class EmbeddedContent(Template): div.text = elements[0] elements = list(elements)[1:] for elem in elements: - elem.getparent().remove(elem) + if hasattr(elem, 'getparent'): + elem.getparent().remove(elem) + else: + elem = SPAN(elem) div.append(elem) class IndexTemplate(Template):