boobot: More urlfix features
This commit is contained in:
parent
9b5b0dcf8b
commit
cc8f3d6de1
1 changed files with 4 additions and 3 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue