1 / 18
Python Scrapy 框架使用案例
目录
Python Scrapy 框架使用案例............................................................................... 1
1 前言.............................................................................................................. 2
2 Scrapy 简介......................................................................................................2
3 安装 Scrapy.................................................................................................. 3
3.1 Windows 安装....................................................................................... 3
3.2 检测....................................................................................................3
4 新建项目(Project )................................................................................... 4
5 明确目标(Items)..................................................................................... 5
6 制作爬虫(Spide r)....................................................................................6
6.1 爬内容................................................................................................6
6.1.1 更改编码..................................................................................... 9
6.2 取内容..............................................................................................10
6.2.1 分析页面....................................................................................11
7 存储内容(Pipeline)............................................................................... 13
8 内容解析.................................................................................................... 17