clone 497142 -1
retitle -1 python-feedparser: ignores namespaces
reassign -1 python-feedparser 4.1-11
found -1 4.1-14
tags 497142 + patch
thanks
* Jakub Wilk <[email protected]>, 2009-08-02, 17:11:
The bug was not fixed at all, but the feed mentioned in the original
report stopped triggering it.
This bug is caused by python-feedparser, which is namespace-aware, but
ignores elements' namespaces.
I attach the patch, which fixes the problem on rss2email the side.
However, python-feedparser should be fixed, too.
--
Jakub Wilk
diff --git a/rss2email.py b/rss2email.py
--- a/rss2email.py
+++ b/rss2email.py
@@ -355,15 +355,15 @@
if conts:
if HTMLOK:
for c in conts:
- if contains(c.type, 'html'): return ('HTML', c.value)
+ if contains(c.get('type', ''), 'html'): return ('HTML', c.value)
if not HTMLOK: # Only need to convert to text if HTML isn't OK
for c in conts:
- if contains(c.type, 'html'):
+ if contains(c.get('type', ''), 'html'):
return html2text(c.value)
for c in conts:
- if c.type == 'text/plain': return c.value
+ if c.get('type', '') == 'text/plain': return c.value
return conts[0].value