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