摘要: 多线程即是同时运行多个子程序,就像爬取10页网页,笨方法就是从第一页爬到第十页这样最少需要十几分钟 而用多线程创建10个线程同时爬十个网页,理论上速度可扩大10倍 例如: import threading,time class MyThread(threading.Thread): def __in 阅读全文
posted @ 2017-10-15 21:57 飞起的小田 阅读(168) 评论(0) 推荐(0) 编辑