网络爬虫,,# -*- coding


# -*- coding: cp936 -*-import WebCrawlerimport timeurl = input('设置入口url(例-->www.baidu.com): \n')thNumber = int(input('设置线程数:'))    #之前类型未转换出bugMaxdepth = int(input('最大搜索深度:'))start = time.clock()url = 'http://' + urlwc = WebCrawler.WebCrawler(thNumber, Maxdepth)wc.Craw(url)end = time.clock()print("The function run time is: %0.02f senconds.\n" %(end - start))

评论关闭