replace \r by \n

This commit is contained in:
Fabrice Laporte 2013-02-02 09:38:49 +01:00
parent f207a3b72e
commit cf73d7cb08

View file

@ -99,6 +99,7 @@ def extract_text(html, starttag):
lyrics = re.sub(r'\n +', '\n', lyrics)
lyrics = re.sub(r' +\n', '\n', lyrics)
lyrics = TAG_RE.sub('', lyrics) # Strip remaining HTML tags.
lyrics = lyrics.replace('\r','\n')
lyrics = lyrics.strip()
return lyrics