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.master
parent
0718303eb7
commit
1fa8c4c535
4
morss.py
4
morss.py
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue