Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix from getting "ValueError: '{IP}\n' does not appear to be an IPv4 or IPv6 address" error #63

Merged
merged 1 commit into from
Sep 20, 2024
Merged
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
4 changes: 2 additions & 2 deletions porkbun_ddns/porkbun_ddns.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_public_ips(self) -> list:
with urllib.request.urlopen(url, timeout=10) as response:
if response.getcode() == 200:
public_ips.append(
response.read().decode("utf-8"))
response.read().decode("utf-8")).strip()
break
logger.warning(
"Failed to retrieve IPv4 Address from %s! HTTP status code: %s", url, str(response.code()))
Expand All @@ -85,7 +85,7 @@ def get_public_ips(self) -> list:
with urllib.request.urlopen(url, timeout=10) as response:
if response.getcode() == 200:
public_ips.append(
response.read().decode("utf-8"))
response.read().decode("utf-8")).strip()
break
logger.warning(
"Failed to retrieve IPv6 Address from %s! HTTP status code: %s", url, str(response.code()))
Expand Down