import requests ipp_addr = input("Enter a ip Address: ") try: response = requests.get(url=f"http://ip-api.com/json/{ipp_addr}") if response.status_code == 200: print(response.json()) else: print("Send requests failed ") except Exception as e: print(e)