diff --git a/update_files.py b/update_files.py index 75664d4..068f81f 100644 --- a/update_files.py +++ b/update_files.py @@ -8,6 +8,8 @@ import yaml import requests import logging +TIMEOUT = 300 + # 初始化日志记录器 logging.basicConfig( level=logging.INFO, @@ -22,7 +24,7 @@ modified = False def download_file(url): """使用 requests 下载文件内容,限制超时时间为 3 分钟""" try: - response = requests.get(url, timeout=180) + response = requests.get(url, timeout=TIMEOUT) response.raise_for_status() return response.text except requests.exceptions.RequestException as e: