yjhfgdfd 发表于 2016-7-11 10:27:08

python 实现汽车之家车型数据爬虫

详细数据在json_text字段里面
安装使用方法:


1
2
3
git clone https://github.com/shancang/spider.git
pip install -r requirements.txt
mysql spider< sql/createTable.sql




修改配置
spider/config.py

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- coding: utf-8
#日志----------------------------------------
#日志目录
LOG_DIR= "/tmp/spider"
#日志级别:debug,info,warning,error,critical
LOG_LEVEL = "info"
#process-----------------------------------
#pid 文件
PID_FILE = "/tmp/spider/spider.pid"
#线程数量
THARED_NUMBER = 6
#数据库------------------------------------
DB_USER = "spider"
PASSWORD = "123456"
DB_HOST = "localhost"
PORT = "3306"
DB_NAME = "spider"




进程管理

1
2
3
python setup.py start #启动
python setup.py stop#停止
python setup.py status # 查看运行状态




具体详细请移步
https://github.com/shancang/spider   
代码仅供学习交流,不得做商业使用,不得恶意使用,造成后果请自行负责。

页: [1]
查看完整版本: python 实现汽车之家车型数据爬虫