import socket,requests,jsondef getIp(domain): myaddr=socket.getaddrinfo(domain,'http')[0][4][0] return (myaddr)IP = input('please input url like --luka77.cn :\n')URL = 'http://ip-api.com/json/'+IPvalue = requests.get(URL)value = value.textvalue = json.loads(value)print(value['isp'])