From 93e575921d9fc3b79d0ec07ca8de274ea961bf9f Mon Sep 17 00:00:00 2001 From: marvzhang Date: Tue, 28 Jan 2020 18:15:19 +0800 Subject: [PATCH 01/16] updated README --- README-zh.md | 13 ++++++------- README.md | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/README-zh.md b/README-zh.md index e2f1e412..fd835c13 100644 --- a/README-zh.md +++ b/README-zh.md @@ -242,13 +242,12 @@ save_item(result) Crawlab使用起来很方便,也很通用,可以适用于几乎任何主流语言和框架。它还有一个精美的前端界面,让用户可以方便的管理和运行爬虫。 -|框架 | 类型 | 分布式 | 前端 | 依赖于Scrapyd | -|:---:|:---:|:---:|:---:|:---:| -| [Crawlab](https://github.com/crawlab-team/crawlab) | 管理平台 | Y | Y | N -| [ScrapydWeb](https://github.com/my8100/scrapydweb) | 管理平台 | Y | Y | Y -| [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | 管理平台 | Y | Y | Y -| [Gerapy](https://github.com/Gerapy/Gerapy) | 管理平台 | Y | Y | Y -| [Scrapyd](https://github.com/scrapy/scrapyd) | 网络服务 | Y | N | N/A +|框架 | 技术 | 优点 | 缺点 | Github 统计数据 | +|:---|:---|:---|-----| :---- | +| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | +| [ScrapydWeb](https://github.com/my8100/scrapydweb) | Python Flask + Vue|精美的 UI 界面,内置了 scrapy 日志解析器,有较多任务运行统计图表,支持节点管理、定时任务、邮件提醒、移动界面,算是 scrapy-based 中功能完善的爬虫管理平台|不支持 scrapy 以外的爬虫,Python Flask 为后端,性能上有一定局限性| ![](https://img.shields.io/github/stars/my8100/scrapydweb) ![](https://img.shields.io/github/forks/my8100/scrapydweb) | +| [Gerapy](https://github.com/Gerapy/Gerapy) | Python Django + Vue|Gerapy 是崔庆才大神开发的爬虫管理平台,安装部署非常简单,同样基于 scrapyd,有精美的 UI 界面,支持节点管理、代码编辑、可配置规则等功能|同样不支持 scrapy 以外的爬虫,而且据使用者反馈,1.0 版本有很多 bug,期待 2.0 版本会有一定程度的改进| ![](https://img.shields.io/github/stars/Gerapy/Gerapy) ![](https://img.shields.io/github/forks/Gerapy/Gerapy) | +| [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | Python Flask|基于 scrapyd,开源版 Scrapyhub,非常简洁的 UI 界面,支持定时任务|可能有些过于简洁了,不支持分页,不支持节点管理,不支持 scrapy 以外的爬虫| ![](https://img.shields.io/github/stars/DormyMo/SpiderKeeper) ![](https://img.shields.io/github/forks/DormyMo/SpiderKeeper) | ## Q&A diff --git a/README.md b/README.md index 81ba33d5..54144a11 100644 --- a/README.md +++ b/README.md @@ -241,13 +241,12 @@ The reason is that most of the existing platforms are depending on Scrapyd, whic Crawlab is easy to use, general enough to adapt spiders in any language and any framework. It has also a beautiful frontend interface for users to manage spiders much more easily. -|Framework | Type | Distributed | Frontend | Scrapyd-Dependent | -|:---:|:---:|:---:|:---:|:---:| -| [Crawlab](https://github.com/crawlab-team/crawlab) | Admin Platform | Y | Y | N -| [ScrapydWeb](https://github.com/my8100/scrapydweb) | Admin Platform | Y | Y | Y -| [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | Admin Platform | Y | Y | Y -| [Gerapy](https://github.com/Gerapy/Gerapy) | Admin Platform | Y | Y | Y -| [Scrapyd](https://github.com/scrapy/scrapyd) | Web Service | Y | N | N/A +|Framework | Technology | Pros | Cons | Github Stats | +|:---|:---|:---|-----| :---- | +| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|Not limited to Scrapy, available for all programming languages and frameworks. Beautiful UI interface. Naturally support distributed spiders. Support spider mangement, task management, cron job, result export, analytics, notifications, configurable spiders, online code editor, etc.|Not yet support spider versioning| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | +| [ScrapydWeb](https://github.com/my8100/scrapydweb) | Python Flask + Vue|Beautiful UI interface, built-in Scrapy log parser, stats and graphs for task execution, support node management, cron job, mail notification, mobile. Full-feature spider management platform.|Not support spiders other than Scrapy. Limited performance because of Python Flask backend.| ![](https://img.shields.io/github/stars/my8100/scrapydweb) ![](https://img.shields.io/github/forks/my8100/scrapydweb) | +| [Gerapy](https://github.com/Gerapy/Gerapy) | Python Django + Vue|Gerapy is built by web crawler guru [Germey Cui](https://github.com/Germey). Simple installation and deployment. Beautiful UI interface. Support node management, code edit, configurable crawl rules, etc.|Again not support spiders other than Scrapy. A lot of bugs based on user feedback in v1.0. Look forward to improvement in v2.0| ![](https://img.shields.io/github/stars/Gerapy/Gerapy) ![](https://img.shields.io/github/forks/Gerapy/Gerapy) | +| [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | Python Flask|Open-source Scrapyhub. Concise and simple UI interface. Support cron job.|Perhaps too simplified, not support pagination, not support node management, not support spiders other than Scrapy.| ![](https://img.shields.io/github/stars/DormyMo/SpiderKeeper) ![](https://img.shields.io/github/forks/DormyMo/SpiderKeeper) | ## Contributors From 53740d26c23876ef0794867fa463d574dec3f0a0 Mon Sep 17 00:00:00 2001 From: marvzhang Date: Tue, 28 Jan 2020 18:55:07 +0800 Subject: [PATCH 02/16] updated demo docker-compose.yml --- jenkins/master/docker-compose.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jenkins/master/docker-compose.yaml b/jenkins/master/docker-compose.yaml index 2f09da6d..87d10d10 100644 --- a/jenkins/master/docker-compose.yaml +++ b/jenkins/master/docker-compose.yaml @@ -6,13 +6,14 @@ services: CRAWLAB_API_ADDRESS: "https://crawlab.cn/api" CRAWLAB_BASE_URL: "/demo" CRAWLAB_SERVER_MASTER: "Y" + CRAWLAB_SERVER_REGISTER_TYPE: "ip" + CRAWLAB_SERVER_REGISTER_IP: "172.19.0.1" CRAWLAB_MONGO_HOST: "mongo" CRAWLAB_REDIS_ADDRESS: "redis" CRAWLAB_LOG_PATH: "/var/logs/crawlab" CRAWLAB_SETTING_ALLOWREGISTER: "Y" ports: - "8080:8080" # frontend - - "8000:8000" # backend depends_on: - mongo - redis @@ -20,6 +21,8 @@ services: image: "tikazyq/crawlab:master" environment: CRAWLAB_SERVER_MASTER: "N" + CRAWLAB_SERVER_REGISTER_TYPE: "ip" + CRAWLAB_SERVER_REGISTER_IP: "172.19.0.2" CRAWLAB_MONGO_HOST: "mongo" CRAWLAB_REDIS_ADDRESS: "redis" depends_on: From 2da57d78f28addd62b9e59e596e8c7e07087e04f Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 29 Jan 2020 08:59:23 +0800 Subject: [PATCH 03/16] Update README-zh.md --- README-zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-zh.md b/README-zh.md index fd835c13..9a2df21e 100644 --- a/README-zh.md +++ b/README-zh.md @@ -244,7 +244,7 @@ Crawlab使用起来很方便,也很通用,可以适用于几乎任何主流 |框架 | 技术 | 优点 | 缺点 | Github 统计数据 | |:---|:---|:---|-----| :---- | -| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | +| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | | [ScrapydWeb](https://github.com/my8100/scrapydweb) | Python Flask + Vue|精美的 UI 界面,内置了 scrapy 日志解析器,有较多任务运行统计图表,支持节点管理、定时任务、邮件提醒、移动界面,算是 scrapy-based 中功能完善的爬虫管理平台|不支持 scrapy 以外的爬虫,Python Flask 为后端,性能上有一定局限性| ![](https://img.shields.io/github/stars/my8100/scrapydweb) ![](https://img.shields.io/github/forks/my8100/scrapydweb) | | [Gerapy](https://github.com/Gerapy/Gerapy) | Python Django + Vue|Gerapy 是崔庆才大神开发的爬虫管理平台,安装部署非常简单,同样基于 scrapyd,有精美的 UI 界面,支持节点管理、代码编辑、可配置规则等功能|同样不支持 scrapy 以外的爬虫,而且据使用者反馈,1.0 版本有很多 bug,期待 2.0 版本会有一定程度的改进| ![](https://img.shields.io/github/stars/Gerapy/Gerapy) ![](https://img.shields.io/github/forks/Gerapy/Gerapy) | | [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | Python Flask|基于 scrapyd,开源版 Scrapyhub,非常简洁的 UI 界面,支持定时任务|可能有些过于简洁了,不支持分页,不支持节点管理,不支持 scrapy 以外的爬虫| ![](https://img.shields.io/github/stars/DormyMo/SpiderKeeper) ![](https://img.shields.io/github/forks/DormyMo/SpiderKeeper) | From c9021c9c0c9402e18a4423b2b598c05d73414ffd Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 29 Jan 2020 09:00:17 +0800 Subject: [PATCH 04/16] Update README-zh.md --- README-zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-zh.md b/README-zh.md index 9a2df21e..aa96b6bf 100644 --- a/README-zh.md +++ b/README-zh.md @@ -244,7 +244,7 @@ Crawlab使用起来很方便,也很通用,可以适用于几乎任何主流 |框架 | 技术 | 优点 | 缺点 | Github 统计数据 | |:---|:---|:---|-----| :---- | -| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | +| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | | [ScrapydWeb](https://github.com/my8100/scrapydweb) | Python Flask + Vue|精美的 UI 界面,内置了 scrapy 日志解析器,有较多任务运行统计图表,支持节点管理、定时任务、邮件提醒、移动界面,算是 scrapy-based 中功能完善的爬虫管理平台|不支持 scrapy 以外的爬虫,Python Flask 为后端,性能上有一定局限性| ![](https://img.shields.io/github/stars/my8100/scrapydweb) ![](https://img.shields.io/github/forks/my8100/scrapydweb) | | [Gerapy](https://github.com/Gerapy/Gerapy) | Python Django + Vue|Gerapy 是崔庆才大神开发的爬虫管理平台,安装部署非常简单,同样基于 scrapyd,有精美的 UI 界面,支持节点管理、代码编辑、可配置规则等功能|同样不支持 scrapy 以外的爬虫,而且据使用者反馈,1.0 版本有很多 bug,期待 2.0 版本会有一定程度的改进| ![](https://img.shields.io/github/stars/Gerapy/Gerapy) ![](https://img.shields.io/github/forks/Gerapy/Gerapy) | | [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | Python Flask|基于 scrapyd,开源版 Scrapyhub,非常简洁的 UI 界面,支持定时任务|可能有些过于简洁了,不支持分页,不支持节点管理,不支持 scrapy 以外的爬虫| ![](https://img.shields.io/github/stars/DormyMo/SpiderKeeper) ![](https://img.shields.io/github/forks/DormyMo/SpiderKeeper) | From b8b0cde6901e4b79d06ffde2263cd9e01dbbc4aa Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 29 Jan 2020 09:02:23 +0800 Subject: [PATCH 05/16] Update README-zh.md --- README-zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-zh.md b/README-zh.md index aa96b6bf..39b3fcd7 100644 --- a/README-zh.md +++ b/README-zh.md @@ -244,7 +244,7 @@ Crawlab使用起来很方便,也很通用,可以适用于几乎任何主流 |框架 | 技术 | 优点 | 缺点 | Github 统计数据 | |:---|:---|:---|-----| :---- | -| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | +| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | | [ScrapydWeb](https://github.com/my8100/scrapydweb) | Python Flask + Vue|精美的 UI 界面,内置了 scrapy 日志解析器,有较多任务运行统计图表,支持节点管理、定时任务、邮件提醒、移动界面,算是 scrapy-based 中功能完善的爬虫管理平台|不支持 scrapy 以外的爬虫,Python Flask 为后端,性能上有一定局限性| ![](https://img.shields.io/github/stars/my8100/scrapydweb) ![](https://img.shields.io/github/forks/my8100/scrapydweb) | | [Gerapy](https://github.com/Gerapy/Gerapy) | Python Django + Vue|Gerapy 是崔庆才大神开发的爬虫管理平台,安装部署非常简单,同样基于 scrapyd,有精美的 UI 界面,支持节点管理、代码编辑、可配置规则等功能|同样不支持 scrapy 以外的爬虫,而且据使用者反馈,1.0 版本有很多 bug,期待 2.0 版本会有一定程度的改进| ![](https://img.shields.io/github/stars/Gerapy/Gerapy) ![](https://img.shields.io/github/forks/Gerapy/Gerapy) | | [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | Python Flask|基于 scrapyd,开源版 Scrapyhub,非常简洁的 UI 界面,支持定时任务|可能有些过于简洁了,不支持分页,不支持节点管理,不支持 scrapy 以外的爬虫| ![](https://img.shields.io/github/stars/DormyMo/SpiderKeeper) ![](https://img.shields.io/github/forks/DormyMo/SpiderKeeper) | From 175c6dbb1aa0c75fe9c116f3e4900cc8942cab54 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 29 Jan 2020 09:04:00 +0800 Subject: [PATCH 06/16] Update README-zh.md --- README-zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-zh.md b/README-zh.md index 39b3fcd7..fd835c13 100644 --- a/README-zh.md +++ b/README-zh.md @@ -244,7 +244,7 @@ Crawlab使用起来很方便,也很通用,可以适用于几乎任何主流 |框架 | 技术 | 优点 | 缺点 | Github 统计数据 | |:---|:---|:---|-----| :---- | -| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | +| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | | [ScrapydWeb](https://github.com/my8100/scrapydweb) | Python Flask + Vue|精美的 UI 界面,内置了 scrapy 日志解析器,有较多任务运行统计图表,支持节点管理、定时任务、邮件提醒、移动界面,算是 scrapy-based 中功能完善的爬虫管理平台|不支持 scrapy 以外的爬虫,Python Flask 为后端,性能上有一定局限性| ![](https://img.shields.io/github/stars/my8100/scrapydweb) ![](https://img.shields.io/github/forks/my8100/scrapydweb) | | [Gerapy](https://github.com/Gerapy/Gerapy) | Python Django + Vue|Gerapy 是崔庆才大神开发的爬虫管理平台,安装部署非常简单,同样基于 scrapyd,有精美的 UI 界面,支持节点管理、代码编辑、可配置规则等功能|同样不支持 scrapy 以外的爬虫,而且据使用者反馈,1.0 版本有很多 bug,期待 2.0 版本会有一定程度的改进| ![](https://img.shields.io/github/stars/Gerapy/Gerapy) ![](https://img.shields.io/github/forks/Gerapy/Gerapy) | | [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | Python Flask|基于 scrapyd,开源版 Scrapyhub,非常简洁的 UI 界面,支持定时任务|可能有些过于简洁了,不支持分页,不支持节点管理,不支持 scrapy 以外的爬虫| ![](https://img.shields.io/github/stars/DormyMo/SpiderKeeper) ![](https://img.shields.io/github/forks/DormyMo/SpiderKeeper) | From 6d4bf334320a96587b11e2578c0b6ff84f7a50d4 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 29 Jan 2020 09:05:27 +0800 Subject: [PATCH 07/16] Update README-zh.md --- README-zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-zh.md b/README-zh.md index fd835c13..e9ded058 100644 --- a/README-zh.md +++ b/README-zh.md @@ -244,7 +244,7 @@ Crawlab使用起来很方便,也很通用,可以适用于几乎任何主流 |框架 | 技术 | 优点 | 缺点 | Github 统计数据 | |:---|:---|:---|-----| :---- | -| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | +| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理|
| | [ScrapydWeb](https://github.com/my8100/scrapydweb) | Python Flask + Vue|精美的 UI 界面,内置了 scrapy 日志解析器,有较多任务运行统计图表,支持节点管理、定时任务、邮件提醒、移动界面,算是 scrapy-based 中功能完善的爬虫管理平台|不支持 scrapy 以外的爬虫,Python Flask 为后端,性能上有一定局限性| ![](https://img.shields.io/github/stars/my8100/scrapydweb) ![](https://img.shields.io/github/forks/my8100/scrapydweb) | | [Gerapy](https://github.com/Gerapy/Gerapy) | Python Django + Vue|Gerapy 是崔庆才大神开发的爬虫管理平台,安装部署非常简单,同样基于 scrapyd,有精美的 UI 界面,支持节点管理、代码编辑、可配置规则等功能|同样不支持 scrapy 以外的爬虫,而且据使用者反馈,1.0 版本有很多 bug,期待 2.0 版本会有一定程度的改进| ![](https://img.shields.io/github/stars/Gerapy/Gerapy) ![](https://img.shields.io/github/forks/Gerapy/Gerapy) | | [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | Python Flask|基于 scrapyd,开源版 Scrapyhub,非常简洁的 UI 界面,支持定时任务|可能有些过于简洁了,不支持分页,不支持节点管理,不支持 scrapy 以外的爬虫| ![](https://img.shields.io/github/stars/DormyMo/SpiderKeeper) ![](https://img.shields.io/github/forks/DormyMo/SpiderKeeper) | From e2dec31a966382050b2ed2913c3905364c0aad8b Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 29 Jan 2020 09:06:49 +0800 Subject: [PATCH 08/16] Update README-zh.md --- README-zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-zh.md b/README-zh.md index e9ded058..fd835c13 100644 --- a/README-zh.md +++ b/README-zh.md @@ -244,7 +244,7 @@ Crawlab使用起来很方便,也很通用,可以适用于几乎任何主流 |框架 | 技术 | 优点 | 缺点 | Github 统计数据 | |:---|:---|:---|-----| :---- | -| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理|
| +| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy,可以运行任何语言和框架的爬虫,精美的 UI 界面,天然支持分布式爬虫,支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) | | [ScrapydWeb](https://github.com/my8100/scrapydweb) | Python Flask + Vue|精美的 UI 界面,内置了 scrapy 日志解析器,有较多任务运行统计图表,支持节点管理、定时任务、邮件提醒、移动界面,算是 scrapy-based 中功能完善的爬虫管理平台|不支持 scrapy 以外的爬虫,Python Flask 为后端,性能上有一定局限性| ![](https://img.shields.io/github/stars/my8100/scrapydweb) ![](https://img.shields.io/github/forks/my8100/scrapydweb) | | [Gerapy](https://github.com/Gerapy/Gerapy) | Python Django + Vue|Gerapy 是崔庆才大神开发的爬虫管理平台,安装部署非常简单,同样基于 scrapyd,有精美的 UI 界面,支持节点管理、代码编辑、可配置规则等功能|同样不支持 scrapy 以外的爬虫,而且据使用者反馈,1.0 版本有很多 bug,期待 2.0 版本会有一定程度的改进| ![](https://img.shields.io/github/stars/Gerapy/Gerapy) ![](https://img.shields.io/github/forks/Gerapy/Gerapy) | | [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | Python Flask|基于 scrapyd,开源版 Scrapyhub,非常简洁的 UI 界面,支持定时任务|可能有些过于简洁了,不支持分页,不支持节点管理,不支持 scrapy 以外的爬虫| ![](https://img.shields.io/github/stars/DormyMo/SpiderKeeper) ![](https://img.shields.io/github/forks/DormyMo/SpiderKeeper) | From 106646e9f587fb9a273c03a65d5574b7563f3c28 Mon Sep 17 00:00:00 2001 From: marvzhang Date: Wed, 29 Jan 2020 09:24:43 +0800 Subject: [PATCH 09/16] fixed https://github.com/crawlab-team/crawlab/issues/465 --- backend/model/task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/model/task.go b/backend/model/task.go index a2792061..abb5ffc5 100644 --- a/backend/model/task.go +++ b/backend/model/task.go @@ -95,7 +95,7 @@ func (t *Task) GetResults(pageNum int, pageSize int) (results []interface{}, tot query := bson.M{ "task_id": t.Id, } - if err = c.Find(query).Skip((pageNum - 1) * pageSize).Limit(pageSize).Sort("-create_ts").All(&results); err != nil { + if err = c.Find(query).Skip((pageNum - 1) * pageSize).Limit(pageSize).All(&results); err != nil { return } From 7654d638d070a59024a866ee46508cb2fdff41dc Mon Sep 17 00:00:00 2001 From: marvzhang Date: Wed, 29 Jan 2020 12:23:10 +0800 Subject: [PATCH 10/16] added tour --- frontend/package.json | 1 + frontend/src/i18n/zh.js | 3 ++ frontend/src/main.js | 7 +++++ frontend/src/utils/index.js | 4 ++- frontend/src/utils/tour.js | 28 +++++++++++++++++ .../views/layout/components/Sidebar/index.vue | 13 ++++++-- frontend/src/views/spider/SpiderList.vue | 22 ++++++++++++-- frontend/yarn.lock | 30 +++++++++++++++++++ 8 files changed, 102 insertions(+), 6 deletions(-) create mode 100644 frontend/src/utils/tour.js diff --git a/frontend/package.json b/frontend/package.json index b08c2689..5f80d096 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -40,6 +40,7 @@ "vue-github-button": "^1.1.2", "vue-i18n": "^8.9.0", "vue-router": "^3.0.1", + "vue-tour": "^1.2.0", "vue-virtual-scroll-list": "^1.3.9", "vuex": "^3.0.1" }, diff --git a/frontend/src/i18n/zh.js b/frontend/src/i18n/zh.js index c9c1d47a..12d261ca 100644 --- a/frontend/src/i18n/zh.js +++ b/frontend/src/i18n/zh.js @@ -406,6 +406,9 @@ docker run -d --restart always --name crawlab_worker \\ 更多信息,请参考 [官方文档](https://docs.crawlab.cn)。 `, + // 教程 + 'Click to add a new spider': '点击并添加爬虫', + // 其他 'Star crawlab-team/crawlab on GitHub': '在 GitHub 上为 Crawlab 加星吧' } diff --git a/frontend/src/main.js b/frontend/src/main.js index ca971a49..5d253547 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -31,6 +31,10 @@ import request from './api/request' import i18n from './i18n' import utils from './utils' +// vue-tour +import VueTour from 'vue-tour' +import 'vue-tour/dist/vue-tour.css' + // code mirror Vue.use(codemirror) @@ -45,6 +49,9 @@ Vue.component('font-awesome-icon', FontAwesomeIcon) Vue.component('font-awesome-layers', FontAwesomeLayers) Vue.component('font-awesome-layers-text', FontAwesomeLayersText) +// vue-tour +Vue.use(VueTour) + Vue.config.productionTip = false // 百度统计 diff --git a/frontend/src/utils/index.js b/frontend/src/utils/index.js index 0578bb07..ab33114f 100644 --- a/frontend/src/utils/index.js +++ b/frontend/src/utils/index.js @@ -1,7 +1,9 @@ import stats from './stats' import encrypt from './encrypt' +import tour from './tour' export default { stats, - encrypt + encrypt, + tour } diff --git a/frontend/src/utils/tour.js b/frontend/src/utils/tour.js new file mode 100644 index 00000000..27f25824 --- /dev/null +++ b/frontend/src/utils/tour.js @@ -0,0 +1,28 @@ +export default { + isFinishedTour: (tourName) => { + if (!localStorage.getItem('tour')) { + localStorage.setItem('tour', JSON.stringify({})) + return false + } + + let data + try { + data = JSON.parse(localStorage.getItem('tour')) + } catch (e) { + localStorage.setItem('tour', JSON.stringify({})) + return false + } + return !!data[tourName] + }, + finishTour: (tourName) => { + let data + try { + data = JSON.parse(localStorage.getItem('tour')) + } catch (e) { + localStorage.setItem('tour', JSON.stringify({})) + data = {} + } + data[tourName] = 1 + localStorage.setItem('tour', JSON.stringify(data)) + } +} diff --git a/frontend/src/views/layout/components/Sidebar/index.vue b/frontend/src/views/layout/components/Sidebar/index.vue index 1123d332..1b16c86f 100644 --- a/frontend/src/views/layout/components/Sidebar/index.vue +++ b/frontend/src/views/layout/components/Sidebar/index.vue @@ -12,7 +12,13 @@ :active-text-color="variables.menuActiveText" mode="vertical" > - + @@ -53,10 +59,11 @@ export default { } }, data () { - return { - } + return {} }, async created () { + }, + mounted () { } } diff --git a/frontend/src/views/spider/SpiderList.vue b/frontend/src/views/spider/SpiderList.vue index def443b7..7f072784 100644 --- a/frontend/src/views/spider/SpiderList.vue +++ b/frontend/src/views/spider/SpiderList.vue @@ -1,5 +1,9 @@