📜  python获取公共IP地址 - Python代码示例

📅  最后修改于: 2022-03-11 14:45:23.249000             🧑  作者: Mango

代码示例2
# This example requires the requests library be installed.  You can learn more
# about the Requests library here: http://docs.python-requests.org/en/latest/

from requests import get

ip = get('https://api.ipify.org').text
print 'My public IP address is:', ip