verify: add an option to check one domain

This commit is contained in:
Felix Yan 2018-12-21 15:12:52 +08:00
parent 1bc0d358f5
commit f72ba5674a
1 changed files with 7 additions and 2 deletions

View File

@ -214,8 +214,13 @@ if __name__ == "__main__":
help='File to examine') help='File to examine')
parser.add_argument('-s', '--sample', nargs='?', default=30, parser.add_argument('-s', '--sample', nargs='?', default=30,
help='Verify only a limited sample. Pass 0 to example all entries.') help='Verify only a limited sample. Pass 0 to example all entries.')
parser.add_argument('-d', '--domain', nargs='?',
help='Verify a domain instead of checking a list. Will ignore the other options.')
config = parser.parse_args() config = parser.parse_args()
v = ChinaListVerify() v = ChinaListVerify()
v.check_domain_list(config.file, sample=int(config.sample))
if config.domain:
v.check_domain_verbose(config.domain)
else:
v.check_domain_list(config.file, sample=int(config.sample))