进程池 Pool
#检测url状态 from multiprocessing.dummy import Pool as ThreadPool import requests siteList = [] 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)
原文地址:https://www.cnblogs.com/AtesetEnginner/p/11254329.html
时间: 2024-10-28 23:36:43