centos7运行scrapy爬虫

1.安装epel扩展源

yum -y install epel-release


2.安装pip

yum -y install python-pip

3.安装scrapy

pip install scrapy


4.若出现 command 'gcc' failed with exit status 1,gcc编译缺少模块

yum install gcc libffi-devel python-devel openssl-devel


5.未安装MySQLdb

yum install MySQL-python


6.若需定时脚本

crontab -e

案例:0 * * * * cd /wnet/pig && scrapy crawl price

猜你喜欢

转载自www.cnblogs.com/sdbq/p/10978213.html
今日推荐