Beautification of code output
This commit is contained in:
parent
f881f74372
commit
6d87f98c35
@ -11,10 +11,10 @@ def query_api(host):
|
|||||||
json_data = requests.get(main_api + x).json()
|
json_data = requests.get(main_api + x).json()
|
||||||
# Print out wanted JSON data formatted nicely
|
# Print out wanted JSON data formatted nicely
|
||||||
print('\nCity\State: {}, {}\n'
|
print('\nCity\State: {}, {}\n'
|
||||||
'Country: {}\n'
|
'Country: {}\n'
|
||||||
'ISP: {}\n'
|
'ISP: {}\n'
|
||||||
'IP: {}\n'
|
'IP: {}\n'
|
||||||
'MX: {}'.format(
|
'MX: {}'.format(
|
||||||
json_data['city'],
|
json_data['city'],
|
||||||
json_data['regionName'],
|
json_data['regionName'],
|
||||||
json_data['country'],
|
json_data['country'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user