mirror of
https://github.com/TG-Twilight/AWAvenue-Ads-Rule.git
synced 2025-11-04 14:49:47 +08:00
fix QuantumultX error
This commit is contained in:
parent
91e7c9817f
commit
ab99e13ada
@ -23,7 +23,7 @@ def format_keyword(List):
|
||||
def format_regex(List):
|
||||
regex = []
|
||||
for line in List:
|
||||
regex_lines = f"DOMAIN-REGEX,{line.strip()},reject".replace("$","").replace("^","").replace("*","").replace("\\.",".")
|
||||
regex_lines = f"DOMAIN-REGEX,{line.strip()},reject"
|
||||
regex.append(regex_lines)
|
||||
return regex
|
||||
|
||||
@ -36,4 +36,4 @@ def format_ip(List):
|
||||
|
||||
def build(rule):
|
||||
list = format_ip(rule.ip_list) + format_domain(rule.domain_list) + format_suffix(rule.suffix_list) + format_keyword(rule.keyword_list) + format_regex(rule.regex_list)
|
||||
return {'list': list, 'suffix': '.list', 'comment': '#', 'total': len(list)}
|
||||
return {'list': list, 'suffix': '.list', 'comment': '#', 'total': len(list)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user