diff --git a/main.py b/main.py index baca7503f..01ed79f6e 100644 --- a/main.py +++ b/main.py @@ -85,7 +85,10 @@ def parse_list_file(link, output_directory): result_rules = {"version": 1, "rules": []} for pattern, addresses in df.groupby('pattern')['address'].apply(list).to_dict().items(): - rule_entry = {pattern: [address.strip() for address in addresses]} + if pattern == 'domain_suffix': + rule_entry = {pattern: ['.' + address.strip() for address in addresses]} + else: + rule_entry = {pattern: [address.strip() for address in addresses]} result_rules["rules"].append(rule_entry) # 使用 output_directory 拼接完整路径