We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff5cfab commit 74d3f4cCopy full SHA for 74d3f4c
trackerslist.py
@@ -1,4 +1,5 @@
1
import requests
2
+from datetime import datetime
3
4
# 要下载的文件链接列表
5
urls = [
@@ -31,9 +32,13 @@ def merge_files(contents):
31
32
# 合并文件并去除空行
33
merged_content = merge_files(file_contents)
34
35
+# 添加当前时间到合并结果的第一行
36
+current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
37
+merged_content_with_time = f"当前合并完成的时间: {current_time}\n{merged_content}"
38
+
39
# 保存合并结果到文件
40
output_file = "trackerslist.txt"
41
with open(output_file, "w") as file:
- file.write(merged_content)
42
+ file.write(merged_content_with_time)
43
44
print(f"文件已合并为 {output_file}")
0 commit comments