优化字典读取

This commit is contained in:
Jing Ling
2020-05-14 15:30:39 +08:00
parent 04c91dcacf
commit 0ac9cac1bb
2 changed files with 3 additions and 1 deletions
+3 -1
View File
@@ -119,7 +119,9 @@ def gen_word_subdomains(expression, path):
with open(path, encoding='utf-8', errors='ignore') as fd:
for line in fd:
word = line.strip().lower()
if not word.isalnum():
if len(word) == 0:
continue
if not word.isascii():
continue
if word.endswith('.'):
word = word[:-1]
Binary file not shown.