strip the input

This commit is contained in:
lionsoul2014 2025-10-30 23:18:03 +08:00
parent 3ea717043c
commit 9797b595ea
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ type 'quit' to exit'''.format(db_path, searcher.get_ip_version().name, cache_pol
# get input ip address and do the search
while True:
ip_str = input("ip2region>> ")
ip_str = input("ip2region>> ").strip()
if len(ip_str) < 2:
continue