Update main.py

This commit is contained in:
Twilight 2024-06-30 00:45:52 +08:00 committed by GitHub
parent a1f9487190
commit 5fb5fe6e38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,7 +43,7 @@ rule = RuleList(domain_file, regex_file, ip_file, ip6_file)
def WriteFile(name, text, suffix, comment):
try:
with open(OUT_PATH + "/AWAvenue-Ads-Rule-" + name + suffix, 'w', encoding="utf-8") as file:
file.write(f"{comment}Title: AWAvenue 秋风广告规则AWAvenue-Ads-Rule\n\n{comment}版本号: {tag}\n{comment}上次更新日期: {format_time}\n\n{comment}项目地址https://github.com/TG-Twilight/AWAvenue-Ads-Rule\n\n{comment}如果需要在其它规则中混合此规则,请在您的规则显眼处注明本规则的出处,谢谢!\n{comment}加入Telegram群组 秋風がく山道 (@AWAvenueAdsChat) 与编写者交流,期待着您的到来!\n{comment}群组链接https://t.me/AWAvenueAdsChat\n{comment}订阅Telegram频道 AWAvenue Ads Rule (@AWAvenueAdsRule) 获取最新公告,期待着您的订阅!\n{comment}频道链接https://t.me/AWAvenueAdsRule\n\n{comment}This project is licensed under the Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.\n\n{comment}AD:\n{comment}倾城极速 - 畅游世界高速互联官网https://wcnmdmht.lol/sb 官网2https://panel.qc02.xyz\n\n\n")
file.write(f"{comment}Title: AWAvenue 秋风广告规则AWAvenue-Ads-Rule\n\n{comment}版本号: {tag}\n{comment}上次更新日期: {format_time}\n\n{comment}项目地址https://github.com/TG-Twilight/AWAvenue-Ads-Rule\n\n{comment}如果需要在其它规则中混合此规则,请在您的规则显眼处注明本规则的出处,谢谢!\n{comment}加入Telegram群组 秋風がく山道 (@AWAvenueAdsChat) 与编写者交流,期待着您的到来!\n{comment}群组链接https://t.me/AWAvenueAdsChat\n{comment}订阅Telegram频道 AWAvenue Ads Rule (@AWAvenueAdsRule) 获取最新公告,期待着您的订阅!\n{comment}频道链接https://t.me/AWAvenueAdsRule\n\n{comment}This project is licensed under the Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.\n\n{comment}AD:\n{comment}倾城极速 - 畅游世界高速互联官网https://panel.qqcjs.top 官网2https://n3b53vrt.wcnmdmht.biz\n\n\n")
for line in text:
file.write(line + "\n")
except Exception as e: