boobot: More urlfix features

This commit is contained in:
Laurent Bachelier 2013-05-09 20:26:29 +02:00 committed by Romain Bignon
commit cc8f3d6de1

View file

@ -46,9 +46,10 @@ STORAGE_FILE = 'boobot.storage'
def fixurl(url): def fixurl(url):
# turn string into unicode url = to_unicode(url)
if not isinstance(url, unicode):
url = url.decode('utf8') # remove javascript crap
url = url.replace('/#!/', '/')
# parse it # parse it
parsed = urlparse.urlsplit(url) parsed = urlparse.urlsplit(url)