️ 更新 autobuild 檔案名稱規則

This commit is contained in:
tdc 2024-02-23 17:20:05 +08:00
parent 6f743ff0cc
commit eb1429feba

View File

@ -83,7 +83,7 @@ for category in filterlist:
def to_pure_domain(filename: str, data: str):
data = data.splitlines()
newdata = '\n'.join(data)
name = filename.split('.txt')[0]
name = filename.split('.txt')[0].split('_')[0]
with open(name+'_domains.txt', 'w') as output:
pattern = r'(?<=^\|\|)\S+\.\S{2,}(?=\^)'
newoutput = '\n'.join(re.findall(pattern, newdata, re.MULTILINE))