I have this JSON file, which I need for geolocation:
Here's what it looks like:
{
"status": "success",
"country": "COUNTRY",
"countryCode": "COUNTRY CODE",
"region": "REGION CODE",
"regionName": "REGION NAME",
"city": "CITY",
"zip": "ZIP CODE",
"lat": LATITUDE,
"lon": LONGITUDE,
"timezone": "TIME ZONE",
"isp": "ISP NAME",
"org": "ORGANIZATION NAME",
"as": "AS NUMBER / NAME",
"query": "IP ADDRESS USED FOR QUERY"
}
Actually, here's what it looks like when I send a GET request:
{"as":"AS7922 Comcast Cable Communications, Inc.","city":"Baltimore","country":"United States","countryCode":"US","isp":"Comcast Cable","lat":39.3281,"lon":-76.6385,"org":"Comcast Cable","query":"69.138.1.254","region":"MD","regionName":"Maryland","status":"success","timezone":"America/New_York","zip":"21211"}
How can I parse this data in Python? To output and print.
Thanks! (Sorry if this may be a duplicate, I can't find anything on here that helps me out)