Python unescape javascript escapped UTF8 sequence

尋找這種答案很浪費生命,記錄下來

print "".join([(len(i)>0 and unichr(int(i,16)) or "") for i in url.split('%u')])

Tags: , ,

Leave a Reply

All Rights Reserved Copyright © 2008 Design by StyleShout and Clazh