摘要: # -*- coding: utf-8 -*- import scrapy from scrapy.http import Request from scrapy.core.engine import ExecutionEngine class ChoutiSpider(scrapy.Spider): name = 'baidu' allowed_domains = ['bai... 阅读全文
posted @ 2018-03-22 16:43 老王的农场 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 规则 from scrapy.http import Request for url in response: yield Request(url=url,callback=self.parse) # yield Request,放到调度器# yield ,放到pipeline def parse(self,response): #获取指定数据,进行持久化 ... 阅读全文
posted @ 2018-03-22 13:10 老王的农场 阅读(108) 评论(0) 推荐(0) 编辑