Commit cecda9e8 authored by Felix Yan's avatar Felix Yan

verify: accurate cdnlist match and allow failure on wild guess

parent 81f74c6a
......@@ -106,10 +106,13 @@ class ChinaListVerify(object):
# Assuming CDNList for non-TLDs
if domain.count(".") > 1 and tldextract.extract(domain).registered_domain != domain:
self.check_cdnlist(domain)
try:
self.check_cdnlist(domain)
except (dns.resolver.NoAnswer, dns.resolver.NXDOMAIN):
pass
for testdomain in self.cdnlist:
if testdomain.endswith(domain):
if testdomain.endswith("." + domain):
self.check_cdnlist(testdomain)
if nxdomain:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment