| -- | -- |
|---|---|
| Version | 1.0.1 |
| WebSite | http://119.23.223.90:8000 |
| Source | https://github.com/GuozhuHe/webspider |
| Keywords | Python3, Tornado, Celery, Requests |
项目简介
本项目使用的编程语言是python3,数据库用的是MySQL, 主要用到的库是celery和requests,并实现了定时任务,出错重试,日志记录,自动更改Cookies等的功能,使用ECharts + Bootstrap 来构建前端页面。
展示页面
Quick Start
以下操作均是在
Linux - Ubuntu环境下执行
- 克隆项目
git clone git@github.com:GuozhuHe/webspider.git- 安装
MySQL,Redis,Python3
# 安装 redis
apt-get install redis-server
# 后台启动 redis-server
nohup redis-server &
# 安装 python3
apt-get install python3
# 安装 MySQL
apt-get install mysql-server
# 启动 MySQL
sudo service mysql start- 配置数据库和表
# 创建数据库
CREATE DATABASE `spider` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
# 还需要创建相关表,表的定义语句在 tests/schema.sql 文件中,可自行复制进 MySQL 命令行中执行。- 在项目根目录下构建
make
# 构建成功后项目的 env/bin 目录下会有可执行脚本- 执行单元测试
make test- 代码风格检查
make flake8- 运行
Web Server
env/bin/web- 运行爬虫程序
# 启动定时任务分发器
env/bin/celery_beat
# 启动爬取 数据 的 worker
env/bin/celery_lg_data_worker
# 启动爬取 职位数据 的 worker
env/bin/celery_lg_jobs_data_worker
# 启动爬取 职位数量 的 worker
env/bin/celery_lg_jobs_count_worker- env/bin 目录下其他可执行脚本
# 直接爬取职位数量
env/bin/crawl_lg_jobs_count
# 直接爬取职位数据
env/bin/crawl_lg_data
# 启动celery监控
env/bin/celery_flower- 清除构建信息
make cleanTODO
-
前后端分离
-
更为丰富的数据展示维度
-
重构爬虫
-
缓存、失效机制
-
Fix Bug:
MySQL Server has gone away. 详见此MR

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

