使用tkinter控制爬虫软件,爬的时候时间太久了就会出现未响应,如何改成下载中
收起
只能开另一个线程了,在后台抓数据。类似这样:
import tkinter as tk import threading def startNewThread(): thread=threading.Thread(target=爬虫函数名,args=()) thread.setDaemon(True) thread.start() tk.Button(root, command=sartNewThread)
报告相同问题?