diff --git a/scripts/generate/PAC_build.py b/scripts/generate/PAC_build.py index 484c2e4b..ba2d0740 100755 --- a/scripts/generate/PAC_build.py +++ b/scripts/generate/PAC_build.py @@ -1,5 +1,5 @@ import os -from datetime import datetime +from datetime import datetime, UTC import ipaddress OUT_DIR = "./" @@ -22,7 +22,7 @@ def fetch_and_convert(src): def main(): - now = datetime.utcnow() + now = datetime.now(UTC) date = now.strftime("%Y%m%d") with open("./scripts/generate/code.js", "r") as f: code = f.read() diff --git a/scripts/generate/acl.py b/scripts/generate/acl.py index 51e8228a..fd2a4277 100644 --- a/scripts/generate/acl.py +++ b/scripts/generate/acl.py @@ -1,4 +1,4 @@ -a_content = '''# 默认代理 +a_content = r'''# 默认代理 [proxy_all] # 直连列表 @@ -39,7 +39,7 @@ # 国内ip地址 ''' -c_content = ''' +c_content = r''' [proxy_list] # 代理关键词 (^|\.)\w*gmail\w*\.\w*$