python 爬虫 scrapy 项目 入门 搭建 demo

数据采集

2018-01-06

348

0

技术:scrapy

运行环境:windows 7 + python2.7 + scrapy

demo功能:提供一个基于scrapy的爬虫demo

源代码

https://gitee.com/youlixishi/demo-world/tree/master/src/python/spirder-gift/demo_spider

安装scrapy

yum install gcc libffi-devel python-devel openssl-devel -y. 当然具体参考错误, 一般是缺少什么,安装什么

windows 需要安装pywin32

生成项目

项目名字只能是字母,数字,下划线

scrapy startproject demo.spider

 

建立新的爬虫

scrapy genspider baidu baidu.com

运行

scrapy crawl baidu

 

欢迎添加微信,互相学习↑↑↑ -_-

发表评论

全部评论:0条

白老虎

programming is not only to solve problems, ways to think