|
@@ -6,7 +6,7 @@ def save_html_to_file(html_content, file_name):
|
|
|
# 保存 HTML 文件的路径,假设保存到 /home 目录下
|
|
|
|
|
|
current_time = datetime.now().strftime("%Y%m%d%H%M%S")
|
|
|
- file_path = f"/home/aihtml/{file_name}_{current_time}.html"
|
|
|
+ file_path = f"/home/aihtml/ai_{current_time}.html"
|
|
|
directory = os.path.dirname(file_path)
|
|
|
if not os.path.exists(directory):
|
|
|
os.makedirs(directory)
|
|
@@ -18,7 +18,7 @@ def save_html_to_file(html_content, file_name):
|
|
|
except Exception as e:
|
|
|
print(f"保存文件时出现错误: {e}")
|
|
|
|
|
|
- return f"{file_name}_{current_time}.html"
|
|
|
+ return f"ai_{current_time}.html"
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|