Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use a dedicated website to obtain a native IP address in Python

Shulou Source: shulou.com Published: 2022-06-01 03:10:19 10月02日 Update

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!

Tags: Website dedicated address local machine content more articles good practical code commands articles look knowledge URL public network reference help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn OPPO Reno MariaDB NVidia Shulou Technology