首页 > 其他 > 详细

scrapy使用

时间:2017-02-18 12:21:01      阅读:1045      评论:0      收藏:0      [点我收藏+]

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运行爬虫后出现结果报错:

技术分享
Paste_Image.png
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/

scrapy使用

原文:http://www.cnblogs.com/tianboblog/p/6340938.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!