Revert "Merge pull request #64 from Aerglonus/dev"

This reverts commit 55bc2b16ee, reversing
changes made to 8c8c9368ba.
This commit is contained in:
Andy
2026-01-30 15:52:06 +00:00
parent 55bc2b16ee
commit 385fcb2752
4 changed files with 64 additions and 128 deletions

View File

@@ -359,13 +359,7 @@ def get_ip_info(session: Optional[requests.Session] = None) -> dict:
If you provide a Requests Session with a Proxy, that proxies IP information
is what will be returned.
"""
try:
response = (session or requests.Session()).get("https://ipinfo.io/json", timeout=10)
if response.ok:
return response.json()
except (requests.RequestException, json.JSONDecodeError):
pass
return None
return (session or requests.Session()).get("https://ipinfo.io/json").json()
def get_cached_ip_info(session: Optional[requests.Session] = None) -> Optional[dict]: