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):
|
||||
# turn string into unicode
|
||||
if not isinstance(url, unicode):
|
||||
url = url.decode('utf8')
|
||||
url = to_unicode(url)
|
||||
|
||||
# remove javascript crap
|
||||
url = url.replace('/#!/', '/')
|
||||
|
||||
# parse it
|
||||
parsed = urlparse.urlsplit(url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue