未验证 提交 44c9f855 编写于 作者: X xiexupang 提交者: GitHub

无法连续下载文档

上级 0fb01a56
......@@ -7,24 +7,37 @@ import time
# 创建主窗口
window = tk.Tk()
window.title('百度文库下载神器')
window.geometry('630x200')
window.title('百度文库下载神器(牛牛定制版)')
window.geometry('630x350')
# 添加背景图
canvas = tk.Canvas(window, height=200, width=600) # 创建画布
image_file1 = tk.PhotoImage(file='pic1.png') # 加载图片文件
image = canvas.create_image(230, 20, anchor='nw', image=image_file1) # 将图片置于画布上
image_file2 = tk.PhotoImage(file='pic2.png') # 加载图片文件
image = canvas.create_image(310, 25, anchor='nw', image=image_file2) # 将图片置于画布上
image_file3 = tk.PhotoImage(file='pic3.png') # 加载图片文件
image = canvas.create_image(130, 120, anchor='nw', image=image_file3) # 将图片置于画布上
canvas.pack() # 放置画布
# 设置文档链接输入框
tk.Label(window, text='文档链接:').place(x=50, y=30)
tk.Label(window, text='文档链接:').place(x=50, y=180)
var_doc_url = tk.StringVar() # 定义变量,用于输入用户名
entry_doc_url = tk.Entry(window, width=66, textvariable=var_doc_url)
entry_doc_url.place(x=110, y=30)
entry_doc_url.place(x=110, y=180)
# 设置邮箱输入框
tk.Label(window, text='收件邮箱:').place(x=50, y=70)
tk.Label(window, text='收件邮箱:').place(x=50, y=220)
var_mailbox = tk.StringVar() # 定义变量,用于输入用户名
entry_mailbox = tk.Entry(window, width=66, textvariable=var_mailbox).place(x=110, y=70)
var_mailbox.set('2280674798@qq.com')
entry_mailbox = tk.Entry(window, width=66, textvariable=var_mailbox).place(x=110, y=220)
# # 设置下载进度条
tk.Label(window, text='下载进度:').place(x=50, y=110)
tk.Label(window, text='下载进度:').place(x=50, y=260)
canvas = tk.Canvas(window, width=465, height=22, bg="white")
canvas.place(x=110, y=110)
canvas.place(x=110, y=260)
# 显示下载进度
def progress():
......@@ -98,15 +111,17 @@ threads.append(t2)
# 双线程
def two_threading():
for t in threads:
t.setDaemon(True)
t.start()
# 设置清空链接和一键下载按钮
btn_clear = tk.Button(window, text='清空链接', command=clear_url)
btn_clear.place(x=150, y=150)
btn_clear.place(x=150, y=305)
btn_download = tk.Button(window, text='一键下载', command=two_threading)
btn_download.place(x=400, y=150)
btn_download.place(x=400, y=305)
window.mainloop()
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册