Skip to content

Instantly share code, notes, and snippets.

@fundon
Created May 28, 2011 09:31
Show Gist options
  • Save fundon/996745 to your computer and use it in GitHub Desktop.
Save fundon/996745 to your computer and use it in GitHub Desktop.
get ip
#!/usr/bin/env python
import urllib
print urllib.urlopen("http://fw.qq.com/ipaddress").read().decode('gbk').encode('utf8')
#output: var IPData = new Array("180.168.84.109","","上海市","");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment