我把云打码集成到scrapy的spider下,chptcha直接接收返回值
yundama = YDMHttp(username, password, appid, appkey)
captcha = yundama.decode(filename, codetype, timeout)
实际调试中发现scrapy请求api的request发送两次,云打码网站也显示两次,这是为什么?
2017-07-04 22:44:01 [requests.packages.urllib3.connectionpool] DEBUG: Starting new HTTP connection (1): api.yundama.com
2017-07-04 22:44:02 [requests.packages.urllib3.connectionpool] DEBUG: http://api.yundama.com:80 "POST /api.php HTTP/1.1" 200 40
2017-07-04 22:44:02 [requests.packages.urllib3.connectionpool] DEBUG: Starting new HTTP connection (1): api.yundama.com
2017-07-04 22:44:02 [requests.packages.urllib3.connectionpool] DEBUG: http://api.yundama.com:80 "POST /api.php HTTP/1.1" 200 40
带你彻底掌握Scrapy,用Django+Elasticsearch搭建搜索引擎
了解课程