fix to remove fucking hack from feedparser >= 5.0 (closes #649)

This commit is contained in:
Romain Bignon 2011-04-24 16:56:49 +02:00
commit fa37ef38e3
2 changed files with 29 additions and 3 deletions

View file

@ -19,7 +19,12 @@
import datetime
import feedparser
if feedparser.__version__ >= '5.0':
# feedparser >= 5.0 replaces this regexp on sgmllib and mechanize < 2.0
# fails with malformated webpages.
import sgmllib
import re
sgmllib.endbracket = re.compile('[<>]')
__all__ = ['Entry', 'Newsfeed']
@ -59,8 +64,6 @@ class Entry:
self.content.append(i.value)
elif self.summary:
self.content.append(self.summary)
else:
self.content = None
if rssid_func:
self.id = rssid_func(self)