作者: Tscccn |
日期: 2015 年 10 月 28 日 |
围观: 10647次+ |
3 条评论
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 -[……]
最新评语