mistake with commenting out function, should definitely go through all functions relevance though
This commit is contained in:
parent
472effd027
commit
9a8acda499
@ -78,23 +78,23 @@ def determine(host):
|
||||
return host_type
|
||||
|
||||
|
||||
# def extract(user_input):
|
||||
# hosts = []
|
||||
# errors = []
|
||||
# for item in user_input:
|
||||
# if validators.url(item):
|
||||
# hosts.append(item)
|
||||
# elif validators.domain(item):
|
||||
# hosts.append(item)
|
||||
# elif validators.ip_address.ipv4(item):
|
||||
# hosts.append(item)
|
||||
# elif validators.ip_address.ipv6(item):
|
||||
# hosts.append(item)
|
||||
# elif validators.email(item):
|
||||
# hosts.append(item)
|
||||
# else:
|
||||
# errors.append(item)
|
||||
# return hosts, errors
|
||||
def extract(user_input):
|
||||
hosts = []
|
||||
errors = []
|
||||
for item in user_input:
|
||||
if validators.url(item):
|
||||
hosts.append(item)
|
||||
elif validators.domain(item):
|
||||
hosts.append(item)
|
||||
elif validators.ip_address.ipv4(item):
|
||||
hosts.append(item)
|
||||
elif validators.ip_address.ipv6(item):
|
||||
hosts.append(item)
|
||||
elif validators.email(item):
|
||||
hosts.append(item)
|
||||
else:
|
||||
errors.append(item)
|
||||
return hosts, errors
|
||||
|
||||
|
||||
def domain(host):
|
||||
|
Loading…
x
Reference in New Issue
Block a user