上一页 1 2 3 4 5 6 ··· 48 下一页
摘要: #coding:utf-8''' 多线程标准类 使用: import 目录名.Threadpool_Class obj=Threadpool_Class.Threadpool_Class(线程最大数) for 数据参数 in 列表: ... 阅读全文
posted @ 2014-05-11 22:25 墨迹哥's 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 总感觉有什么地方出错了。这爬虫总是不通用。。#coding:utf-8import Queue,re,urllib2import threadingfrom BeautifulSoup import BeautifulSoup# 目标task_url="http://www.baidu.com/"#... 阅读全文
posted @ 2014-04-29 14:56 墨迹哥's 阅读(304) 评论(0) 推荐(0) 编辑
摘要: #coding:utf-8import sys,urllib2,re,Queuesys.path.append("..")from lib.Http_Class import Http_Classfrom BeautifulSoup import BeautifulSoup#############... 阅读全文
posted @ 2014-04-29 13:49 墨迹哥's 阅读(679) 评论(0) 推荐(0) 编辑
摘要: 之前写的爬虫目前需要调优,所以重写。我必须做到不依赖数据库,不然的话太麻烦了。昨晚睡不着,好好思考了下,发现BUG还有几处。今天记录下。#coding:utf-8import sys,urllib2,re,Queuesys.path.append("..")from lib.Http_Class i... 阅读全文
posted @ 2014-04-29 11:03 墨迹哥's 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 不知道为什么会有不稳定的情况,这点十分苦恼。。。#coding:utf-8import timeimport threadingimport Queueimport sysclass Worker(threading.Thread): def __init__(self, name, queu... 阅读全文
posted @ 2014-04-23 23:53 墨迹哥's 阅读(417) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 48 下一页