Skip to content

Commit

Permalink
Remove some more junk in LyricwikiParser
Browse files Browse the repository at this point in the history
  • Loading branch information
timoloewe committed Dec 5, 2016
1 parent 9b13c1b commit d9054de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lLyrics/LyricwikiParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import string
import html

import re

import Util


Expand Down Expand Up @@ -64,6 +66,10 @@ def get_lyrics(self, resp):
resp = html.unescape(resp)
resp = resp.replace("<br>", "\n")
resp = resp.replace("<br />", "\n")
resp = resp.replace("<i>", "")
resp = resp.replace("</i>", "")
resp = re.sub("<a[^>]*>", "", resp)
resp = resp.replace("</a>", "")
resp = resp.strip()

return resp

0 comments on commit d9054de

Please sign in to comment.