0. workon scrapy_py3 (进入Python虚拟环境)
1. cd指定目录
2. scrapy startproject AdilCrawler
3. cd 到项目AdilCrawler下,执行scrapy genspider thousandPic www.58pic.com
4. cd spiders文件夹中, 编辑文件thousandPic.py。
5. 启动爬虫 scrapy crawl thousandPic (如果报错 builtins.ModuleNotFoundError: No module named '_sqlite3')
处理方法:
> 下载 sqlite-autoconf-3240000.tar.gz, 地址:https://www.sqlite.org/download.html
> 安装 ./configure --prefix=/usr/local/sqlite && make && sudo make install
> 下载Python-3.6.10.tar, 如果有python3的tar包可以不需要下载了,建议使用tar包编译安装。
> cd Python-3.6.10
> vi setup.py 添加如图两句。
>