# coding=utf-8 # 目录扫描程序 class DirScan(threading.Thread): def __init__(self, queue, total): """ 初始化 :param queue: 队列 """ threading.Thread.__init__(self) self._queue = queue self._total = total self._ua = UserAgent() def run(self): while not self._queue.empty(): url = self._queue.get() # 单独用一个线程去输出 threading.Thread(target=self.msg()).start() headers = { ......
1