URL to IP address and location

 try:

import socket as s

import requests

host=input("Enter website url:")

t=s.gethostbyname(host)

print("IP of {} is {}".format(host,t))

response = requests.get("http://api.hostip.info/get_html.php?ip={}&position=true".format(t))

print(response.text)

except Exception as e:

print(e)