mirror of
https://github.com/NewFuture/DDNS.git
synced 2022-04-19 20:24:44 +00:00
fix(ip.py): ignore non-utf format encoding (#288)
Co-authored-by: Red_Hairy_Mouse <56833537+cjw-bot@users.noreply.github.com>
This commit is contained in:
co-authored by
Red_Hairy_Mouse
parent
5b03cd249d
commit
914f3c09c3
+1
-1
@@ -51,7 +51,7 @@ def _open(url, reg):
|
||||
debug("open: %s", url)
|
||||
res = urlopen(
|
||||
Request(url, headers={'User-Agent': 'curl/7.63.0-ddns'}), timeout=60
|
||||
).read().decode('utf8')
|
||||
).read().decode('utf8', 'ignore')
|
||||
debug("response: %s", res)
|
||||
return compile(reg).search(res).group()
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user