摘要: 创建项目 scrapy startproject dongguan items.py 创建CrawSpider,使用模版crawl scrapy genspider -t crawl sun wz.sun0769.com sun.py pipelines.py 执行 scrapy crawl sun 阅读全文
posted @ 2018-06-21 22:25 王琳杰 阅读(642) 评论(0) 推荐(0) 编辑
摘要: CrawlSpider不在手动处理url,它会自动匹配到响应文件里的所有符合匹配规则的链接。 创建项目scrapy startproject TencentSpider items.py 创建CrawlSpider,使用模版crawl scrapy genspider -t crawl tencen 阅读全文
posted @ 2018-06-21 21:49 王琳杰 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 响应文件 导入LinkExtractor,匹配整个html文档中的链接 from scrapy.linkextractors import LinkExtractor 阅读全文
posted @ 2018-06-21 21:20 王琳杰 阅读(479) 评论(0) 推荐(0) 编辑
摘要: 创建项目scrapy startproject tencent 编写items.py写class TencentItem 创建基础类的爬虫 scrapy genspider tencentPosition"tencent.com" tencentPosition.py 管道文件pipelines.p 阅读全文
posted @ 2018-06-21 20:29 王琳杰 阅读(225) 评论(0) 推荐(0) 编辑