sohu 获取公网IP地址方式 http://txt.go.sohu.com/ip/soip
python方式
#!/usr/bin/python
# -*- coding:utf8 -*-
import urllib2
import re
url = urllib2.urlopen("http://txt.go.sohu.com/ip/soip")
text = url.read()
ip = re.findall(r'\d+.\d+.\d+.\d+',text)
print ip[0]
shell
echo $(curl -s http://txt.go.sohu.com/ip/soip)| grep -P -o -i "(\d+\.\d+.\d+.\d+)"
如果你觉得好,请大家到公众号给个红心支持一下!!

- THE END -

玩趣儿

统计号码省份api
https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=
curl -s http://txt.go.sohu.com/ip/soip |grep -oP "(\d+\.){3}\d+"curl -s http://txt.go.sohu.com/ip/soip | awk '{t=$0;gsub(/.*sohu_user_ip="|";.*/,"",t);print t}'