命令行获取外网IP
1、Linux
curl -L "https://tool.nbqykj.cn/network/ip/myip?type=html"
2、Python
resp = requests.get(url="https://tool.nbqykj.cn/network/ip/myip?type=html",timeout=60) print(resp.text) 或 resp = requests.get(url="https://tool.nbqykj.cn/network/ip/myip?type=json",timeout=60) print(resp.json()['ip'])