Open abdullahdevrel opened 3 months ago
Feel free to submit a PR with the proposed changes.
Hi @datawookie,
Thanks. There is a difference between the current API response and our API response. We do not return the "country name." We only return the country code to make our API response lighter and marginally faster while providing the necessary geolocation context.
{
"ip": "8.8.8.8",
"hostname": "dns.google",
"anycast": true,
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.4056,-122.0775",
"org": "AS15169 Google LLC",
"postal": "94043",
"timezone": "America/Los_Angeles"
}
Based on the API response the output for the [location](https://github.com/datawookie/medusa-proxy/blob/446f4458884b26fb96ab4f3cd8054c33a7d32f59/proxy/tor.py#L101)
will be:
' | US | San Francisco | +37.33 / -120.50'
Would this be acceptable?
No problem. How about using the country code too. So, for example, "San Francisco, US".
@datawookie please kindly review the PR.
I would like to recommend ipinfo.io for IP data.
Usage example:
Documentation: https://ipinfo.io/developers
Free IP databases: https://ipinfo.io/products/free-ip-database
Consider including IPinfo in the project for accurate data and generous free access. Please let me know what you think. Thank you very much.