ipv6检测应该域名解析后再进行判断 #910
Closed
TeamBreakerr
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
目前ipv6都是只判断url字面量是否符合,加入域名解析也经过测试,会明显增加更新时间,有可能是执行流程需要多次调用该方法的缘故,后续会优化执行流程再加入域名解析。 |
Beta Was this translation helpful? Give feedback.
3 replies
-
该功能已实现,请更新 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
我经过了测试,如果只筛选ipv6地址,那么结果中只会出现字面量是ipv6地址的链接
但是域名解析后是ipv6地址的情况就没有进行考虑
def is_ipv6(url):
"""
Check if the url is ipv6
"""
try:
host = urllib.parse.urlparse(url).hostname
ipaddress.IPv6Address(host)
return True
except ValueError:
return False
Beta Was this translation helpful? Give feedback.
All reactions