Kvikontent commited on
Commit
907a2dd
1 Parent(s): 3dfd80b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -22
app.py CHANGED
@@ -33,17 +33,17 @@ if get == "Input":
33
  if sub:
34
  data = get_location(ip)
35
  if data:
36
- st.write(f"""Information that we searched for this ip address: {data[0]}
37
- City: {data[1]}
38
- Region: {data[2]}
39
- Country: {data[3]}
40
- Postal code: {data[4]}
41
- Latitude: {data[5]}
42
- Longitude: {data[6]}
43
- Timezone: {data[7]}
44
- UTC Offset: {data[8]}
45
- Country Calling Code: {data[9]}
46
- Country Population: {data[10]}""")
47
 
48
  if get == "Get yours":
49
  ip = get_ip()
@@ -51,14 +51,14 @@ if get == "Get yours":
51
  if sub:
52
  data = get_location(ip)
53
  if data:
54
- st.write(f"""Information that we searched for this ip address: {data[0]}
55
- City: {data[1]}
56
- Region: {data[2]}
57
- Country: {data[3]}
58
- Postal code: {data[4]}
59
- Latitude: {data[5]}
60
- Longitude: {data[6]}
61
- Timezone: {data[7]}
62
- UTC Offset: {data[8]}
63
- Country Calling Code: {data[9]}
64
- Country Population: {data[10]}""")
 
33
  if sub:
34
  data = get_location(ip)
35
  if data:
36
+ st.write(f"""Information that we searched for this ip address: {data['ip']}
37
+ City: {data['city']}
38
+ Region: {data['region']}
39
+ Country: {data['country']}
40
+ Postal code: {data['postalcode']}
41
+ Latitude: {data['latitude']}
42
+ Longitude: {data['longitude']}
43
+ Timezone: {data['timezone']}
44
+ UTC Offset: {data['utc_offset']}
45
+ Country Calling Code: {data['country_calling_code']}
46
+ Country Population: {data['country_population']}""")
47
 
48
  if get == "Get yours":
49
  ip = get_ip()
 
51
  if sub:
52
  data = get_location(ip)
53
  if data:
54
+ st.write(f"""Information that we searched for this ip address: {data['ip']}
55
+ City: {data['city']}
56
+ Region: {data['region']}
57
+ Country: {data['country']}
58
+ Postal code: {data['postalcode']}
59
+ Latitude: {data['latitude']}
60
+ Longitude: {data['longitude']}
61
+ Timezone: {data['timezone']}
62
+ UTC Offset: {data['utc_offset']}
63
+ Country Calling Code: {data['country_calling_code']}
64
+ Country Population: {data['country_population']}""")