Welcome aboard! We are happy you are here and wish you good net-raft!
// import json is needed yet
import requests
import json
hostname = requests.get('http://ipinfo.io')
data = json.loads(hostname.text)
print (data['hostname'])
import requests
hostname = requests.get('http://ipinfo.io')
data = json.loads(hostname.text)
print (data['hostname'])
The most helpful PYTHON solutions
how to get client ip address using python ?PYTHON Click to see more ... 337 38