Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Support [tnedi.me](https://tnedi.me/json)
### Changed
- `get_private_ipv4` function modified
- `_ipsb_ipv4` function modified
- Test system modified
## [0.2] - 2025-05-04
### Added
Expand Down
2 changes: 1 addition & 1 deletion ipspot/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _ipsb_ipv4(geo: bool=False, timeout: Union[float, Tuple[float, float]]
:param timeout: timeout value for API
"""
try:
response = requests.get("https://api.ip.sb/geoip", headers=REQUEST_HEADERS, timeout=timeout)
response = requests.get("https://api-ipv4.ip.sb/geoip", headers=REQUEST_HEADERS, timeout=timeout)
response.raise_for_status()
data = response.json()
result = {"status": True, "data": {"ip": data.get("ip"), "api": "ip.sb"}}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ipv4.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_public_ipv4_ipinfo_net_error():


def test_public_ipv4_ipsb_success():
result = get_public_ipv4(api=IPv4API.IPSB, geo=True)
result = get_public_ipv4(api=IPv4API.IPSB, geo=True, timeout=30)
assert result["status"]
assert is_ipv4(result["data"]["ip"])
assert set(result["data"].keys()) == DATA_ITEMS
Expand Down