进程池 Pool
#检测url状态from multiprocessing.dummy import Pool as ThreadPoolimport requestssiteList = []with open("all1.txt") as f: for line in f.readlines(): siteList.append(line)pool = ThreadPool()results = pool.map(requests.get, siteList)for r in results: print (r.status_code)