1、安装:pip3 install scrapy
结果安装失败,由于Failed building wheel for Twisted;单独安装Twisted,下载了Twisted-16.6.0-cp35-cp35m-win_amd64.whl文件
pip3 install 目录\Twisted-16.6.0-cp35-cp35m-win_amd64.whl 安装成功,再次执行pip3 install scrapy
2、新建项目
cd 项目存在路径
scrapy startproject 项目名称
Module `scrapy.conf` is deprecated, use `crawler.settings` attribute instead from scrapy.conf import settings
from scrapy.conf import crawler.settings 修改为:from scrapy.settings import Settings
Module `scrapy.log` has been deprecated, Scrapy now relies on the builtin Python library for logging. Read the updated logging entry in the documentation to learn more.
如果scrapy crawl xxx运行爬虫后出现结果报错:
ImportError: cannot import name ‘_win32stdio‘
ImportError: No module named ‘win32api‘
因为twisted需要安装依赖模块pywin32
pip install pypiwin32
pip源:http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
国内:https://pypi.doubanio.com/simple/
原文:http://www.cnblogs.com/tianboblog/p/6340938.html