Python get public IP

Python 20 ธ.ค. 2021

I liked the They even provide Python code for using their API.

# This example requires the requests library be installed.  You can learn more
# about the Requests library here:
from requests import get

ip = get('').content.decode('utf8')
print('My public IP address is: {}'.format(ip))



Just a middle-aged programmer, Can do many things but not the most.