How to use a dedicated website to obtain a native IP address in Python
This article is about how to use a dedicated website to obtain native IP addresses in Python. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Use a dedicated website
The public network IP is obtained.
Web site: http://myip.ipip.net
Code:
Import requestsres = requests.get ('http://myip.ipip.net', timeout=5) .textprint (res)
I prefer to use this, and you can also use it in the command window:
Curl http://myip.ipip.net
Thank you for reading! This is the end of the article on "how to use a dedicated website to obtain a native IP address in Python". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!