1.获取公网IP地址方式,访问:http://txt.go.sohu.com/ip/soip

 

2.代码实现

import requests

import re

req=requests.get("http://txt.go.sohu.com/ip/soip")

ip=re.findall(r'\d+.\d+.\d+.\d+',req)

print(ip[0])

 

1.获取公网IP地址方式,访问:http://txt.go.sohu.com/ip/soip

 

2.代码实现

import requests

import re

req=requests.get("http://txt.go.sohu.com/ip/soip")

ip=re.findall(r'\d+.\d+.\d+.\d+',req)

print(ip[0])

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2021-09-16
  • 2021-12-10
  • 2021-11-09
猜你喜欢
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
  • 2021-09-14
相关资源
相似解决方案