scrapy从入门到放弃一

2017-10-22  本文已影响0人  小白变黑记

一.python 的安装

本人使用的windows系统,在以前学习python,windows环境安装东西不会太顺利,所以我选择安装了Anaconda下载地址

二.scrapy 安装

安装命令:pip install scrapy

三.scrapy的使用

1)查看scrapy的命令

scrapy -help 

2)创建项目

scrapy startproject testscrapy testscrapy为scrapy的项目名称

3)创建项目后进入testscrapy 目录创建自己的爬虫

scrapy genspider testspider test.com  testspider为爬虫的名称,test.com为当前爬虫所允许的域名

4)运行爬虫

scrapy crawl testspider

下篇来实战,这篇不足不断补充中......

上一篇 下一篇

猜你喜欢

热点阅读