summaryrefslogtreecommitdiff
path: root/misc.py
diff options
context:
space:
mode:
authorjerous <jerous@gmail.com>2008-11-16 14:18:01 +0100
committerjerous <jerous@gmail.com>2008-11-16 14:18:01 +0100
commiteda67631660a2b30a1f264384f8e0f9be73e1d40 (patch)
tree8bf5c86119d0dd8f35a80e443a3071c5e40d15ed /misc.py
parent5dd321b46784ed695f96d0a37b1a8628f210b873 (diff)
fix replacing \r in fetching from sites
Diffstat (limited to 'misc.py')
-rw-r--r--misc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc.py b/misc.py
index 5df1ffa..0781146 100644
--- a/misc.py
+++ b/misc.py
@@ -105,7 +105,7 @@ def fetch(SE, sites, song=None, xtra_tags={}, stripHTML=True):
charset='iso-8859-1'
log.debug(" charset not found. Assuming %s"%(charset))
data=match.group(1)
- data=re.sub('\033', '', data) # replace ^M
+ data=re.sub(chr(13), '', data) # replace ^M aka \r
data=unicode(data, charset)
if stripHTML:
# do we want HTML?