newsfeed: No need for workaround with feedparser>=5.1
This commit is contained in:
parent
3ed6103740
commit
362b441445
1 changed files with 3 additions and 3 deletions
|
|
@ -24,9 +24,9 @@ try:
|
|||
except ImportError:
|
||||
raise ImportError('Please install python-feedparser')
|
||||
|
||||
if feedparser.__version__ >= '5.0':
|
||||
# feedparser >= 5.0 replaces this regexp on sgmllib and mechanize < 2.0
|
||||
# fails with malformated webpages.
|
||||
if '5.1' > feedparser.__version__ >= '5.0':
|
||||
# feedparser 5.0.x replaces this regexp on sgmllib
|
||||
# and mechanize < 0.2 fails with malformed pages.
|
||||
import sgmllib
|
||||
import re
|
||||
sgmllib.endbracket = re.compile('[<>]')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue