目标网站
python 爬虫 scrapy 爬取搜狗网址导航
准备爬取内容
python 爬虫 scrapy 爬取搜狗网址导航
创建scrapy项目,生成爬虫文件
python 爬虫 scrapy 爬取搜狗网址导航
分析html标签
python 爬虫 scrapy 爬取搜狗网址导航
抓取内容
python 爬虫 scrapy 爬取搜狗网址导航
自定义存储方式
修改pipelines.py,使数据自动存成json格式
python 爬虫 scrapy 爬取搜狗网址导航
在setting文件中加入刚刚写好的管道
python 爬虫 scrapy 爬取搜狗网址导航
运行一下爬虫
python 爬虫 scrapy 爬取搜狗网址导航
项目目录下新增了一个文件
python 爬虫 scrapy 爬取搜狗网址导航
文件内容
python 爬虫 scrapy 爬取搜狗网址导航

相关文章: