Remove cleanXML()

This function is way too strong, and no longer needed (even for the targeted feed). It lead to other bugs with other feeds, where needed spaces were stripped.
This commit is contained in:
pictuga 2013-07-15 11:10:19 +02:00
parent 0718303eb7
commit 1fa8c4c535

View File

@ -65,9 +65,6 @@ def log(txt):
with open('morss.log', 'a') as file: with open('morss.log', 'a') as file:
file.write(repr(txt).encode('utf-8') + "\n") file.write(repr(txt).encode('utf-8') + "\n")
def cleanXML(xml):
table = string.maketrans('', '')
return xml.translate(table, table[:32]).lstrip()
def lenHTML(txt): def lenHTML(txt):
if len(txt): if len(txt):
@ -329,7 +326,6 @@ def Gather(url, cachePath, mode='feed'):
except (urllib2.HTTPError, urllib2.URLError): except (urllib2.HTTPError, urllib2.URLError):
return False return False
xml = cleanXML(xml)
rss = feeds.parse(xml) rss = feeds.parse(xml)
size = len(rss) size = len(rss)