tldextract本地化

This commit is contained in:
Jing Ling
2020-09-25 03:41:33 +08:00
parent 6a831c07ab
commit 8f7ea692b2
6 changed files with 284 additions and 49 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import re
import tldextract
from common import tldextract
from config import settings
@@ -38,7 +38,7 @@ class Domain(object):
"""
data_storage_dir = settings.data_storage_dir
extract_cache_file = data_storage_dir.joinpath('public_suffix_list.dat')
ext = tldextract.TLDExtract(extract_cache_file, None)
ext = tldextract.TLDExtract(extract_cache_file)
result = self.match()
if result:
return ext(result)