2011å¹´02æ16æ¥23:57 ç縮URLã1è¡ã§å±éãã@Python Tweet ç縮URLãå±éããã¹ã¯ãªãããPython&ã¯ã³ã©ã¤ãã¼ã§æ¸ãã¦ã¿ã¾ãããPythonã§ã¯ã³ã©ã¤ãã¼ããæå³ãªãæ°ããã¾ããããã import sys, urllib2; print (len(sys.argv)>1) and urllib2.urlopen(sys.argv[1]).geturl() or "Usage: # python .py url" å®è¡ãã¦ã¿ãã¨ã $ python expand.py http://bit.ly/dpiOZv http://twitter.com/ ã¦ãªæãã«ãªãã¾ããurllib2.urlopen()ã§ãªã½ã¼ã¹ãéããã®ã¡ãgeturl()ã§å±éããURLãåå¾ã§ãã¾ãã Enjoy!! ãPythonãå¦ã¶ãã«ãã´ãªã®ææ°è¨äº ç縮URLã1è¡ã§å±é
{{#tags}}- {{label}}
{{/tags}}