AWAvenue-Ads-Rule/script/AdClose.py
Twilight c7c655b363
Some checks failed
build Rule / execute_python_script (push) Has been cancelled
Support adclose user self-import rules.(Test)
2024-11-15 10:39:19 +08:00

13 lines
364 B
Python
Executable File

import json
def format_domain(List):
domain = ["#This rule is only used with AdClose", "", ""]
for line in List:
domain_lines = f"domain, {line.strip()}"
domain.append(domain_lines)
return domain
def build(rule):
return {'list': format_domain(rule.domain_list), 'suffix': '.rule', 'comment': '#', 'total': len(rule.domain_list)}