使用爬虫的scrapy框架爬取百度贴吧某个贴吧每个帖子的数据
scrapy为爬虫框架 通过框架更加效率的提取数据 使用scrapy框架时 只需要 通过正则 或者xpath 提取想要爬取的数据首先安装 scrapy 模块 使用命令行 pip install scrapy 如果安装失败 则使用其他方法安装 在其他文章里面有详细介绍再创建一个 项目 先cd到所需文件夹 scrapy startproject teiba 再创建一个爬虫 先cd到所建项目 cd teiba scrapy genspider tb tieba.baidiu.com
原创
2020-07-05 22:14:48 ·
2081 阅读 ·
2 评论