diff --git a/backend/services/spider.go b/backend/services/spider.go index fc0a8d2f..36872460 100644 --- a/backend/services/spider.go +++ b/backend/services/spider.go @@ -269,7 +269,7 @@ func InitSpiderService() error { if model.IsMaster() { // 添加Demo爬虫 - templateSpidersDir := "../spiders" + templateSpidersDir := "./template/spiders" for _, info := range utils.ListDir(templateSpidersDir) { if !info.IsDir() { continue diff --git a/spiders/amazon_config/Spiderfile b/backend/template/spiders/amazon_config/Spiderfile similarity index 100% rename from spiders/amazon_config/Spiderfile rename to backend/template/spiders/amazon_config/Spiderfile diff --git a/spiders/autohome_config/Spiderfile b/backend/template/spiders/autohome_config/Spiderfile similarity index 100% rename from spiders/autohome_config/Spiderfile rename to backend/template/spiders/autohome_config/Spiderfile diff --git a/spiders/baidu_config/Spiderfile b/backend/template/spiders/baidu_config/Spiderfile similarity index 100% rename from spiders/baidu_config/Spiderfile rename to backend/template/spiders/baidu_config/Spiderfile diff --git a/spiders/bing_general/Spiderfile b/backend/template/spiders/bing_general/Spiderfile similarity index 100% rename from spiders/bing_general/Spiderfile rename to backend/template/spiders/bing_general/Spiderfile diff --git a/spiders/bing_general/bing_spider.py b/backend/template/spiders/bing_general/bing_spider.py similarity index 100% rename from spiders/bing_general/bing_spider.py rename to backend/template/spiders/bing_general/bing_spider.py diff --git a/spiders/chinaz/Spiderfile b/backend/template/spiders/chinaz/Spiderfile similarity index 100% rename from spiders/chinaz/Spiderfile rename to backend/template/spiders/chinaz/Spiderfile diff --git a/spiders/chinaz/chinaz/__init__.py b/backend/template/spiders/chinaz/chinaz/__init__.py similarity index 100% rename from spiders/chinaz/chinaz/__init__.py rename to backend/template/spiders/chinaz/chinaz/__init__.py diff --git a/spiders/chinaz/chinaz/items.py b/backend/template/spiders/chinaz/chinaz/items.py similarity index 100% rename from spiders/chinaz/chinaz/items.py rename to backend/template/spiders/chinaz/chinaz/items.py diff --git a/spiders/chinaz/chinaz/middlewares.py b/backend/template/spiders/chinaz/chinaz/middlewares.py similarity index 100% rename from spiders/chinaz/chinaz/middlewares.py rename to backend/template/spiders/chinaz/chinaz/middlewares.py diff --git a/spiders/chinaz/chinaz/pipelines.py b/backend/template/spiders/chinaz/chinaz/pipelines.py similarity index 100% rename from spiders/chinaz/chinaz/pipelines.py rename to backend/template/spiders/chinaz/chinaz/pipelines.py diff --git a/spiders/chinaz/chinaz/settings.py b/backend/template/spiders/chinaz/chinaz/settings.py similarity index 100% rename from spiders/chinaz/chinaz/settings.py rename to backend/template/spiders/chinaz/chinaz/settings.py diff --git a/spiders/chinaz/chinaz/spiders/__init__.py b/backend/template/spiders/chinaz/chinaz/spiders/__init__.py similarity index 100% rename from spiders/chinaz/chinaz/spiders/__init__.py rename to backend/template/spiders/chinaz/chinaz/spiders/__init__.py diff --git a/spiders/chinaz/chinaz/spiders/chinaz_spider.py b/backend/template/spiders/chinaz/chinaz/spiders/chinaz_spider.py similarity index 100% rename from spiders/chinaz/chinaz/spiders/chinaz_spider.py rename to backend/template/spiders/chinaz/chinaz/spiders/chinaz_spider.py diff --git a/spiders/chinaz/scrapy.cfg b/backend/template/spiders/chinaz/scrapy.cfg similarity index 100% rename from spiders/chinaz/scrapy.cfg rename to backend/template/spiders/chinaz/scrapy.cfg diff --git a/spiders/csdn/csdn_spider.js b/backend/template/spiders/csdn/csdn_spider.js similarity index 100% rename from spiders/csdn/csdn_spider.js rename to backend/template/spiders/csdn/csdn_spider.js diff --git a/spiders/csdn_config/Spiderfile b/backend/template/spiders/csdn_config/Spiderfile similarity index 100% rename from spiders/csdn_config/Spiderfile rename to backend/template/spiders/csdn_config/Spiderfile diff --git a/spiders/douban_config/Spiderfile b/backend/template/spiders/douban_config/Spiderfile similarity index 100% rename from spiders/douban_config/Spiderfile rename to backend/template/spiders/douban_config/Spiderfile diff --git a/spiders/jd/Spiderfile b/backend/template/spiders/jd/Spiderfile similarity index 100% rename from spiders/jd/Spiderfile rename to backend/template/spiders/jd/Spiderfile diff --git a/spiders/jd/jd/__init__.py b/backend/template/spiders/jd/jd/__init__.py similarity index 100% rename from spiders/jd/jd/__init__.py rename to backend/template/spiders/jd/jd/__init__.py diff --git a/spiders/jd/jd/items.py b/backend/template/spiders/jd/jd/items.py similarity index 100% rename from spiders/jd/jd/items.py rename to backend/template/spiders/jd/jd/items.py diff --git a/spiders/jd/jd/middlewares.py b/backend/template/spiders/jd/jd/middlewares.py similarity index 100% rename from spiders/jd/jd/middlewares.py rename to backend/template/spiders/jd/jd/middlewares.py diff --git a/spiders/jd/jd/pipelines.py b/backend/template/spiders/jd/jd/pipelines.py similarity index 100% rename from spiders/jd/jd/pipelines.py rename to backend/template/spiders/jd/jd/pipelines.py diff --git a/spiders/jd/jd/settings.py b/backend/template/spiders/jd/jd/settings.py similarity index 100% rename from spiders/jd/jd/settings.py rename to backend/template/spiders/jd/jd/settings.py diff --git a/spiders/jd/jd/spiders/__init__.py b/backend/template/spiders/jd/jd/spiders/__init__.py similarity index 100% rename from spiders/jd/jd/spiders/__init__.py rename to backend/template/spiders/jd/jd/spiders/__init__.py diff --git a/spiders/jd/jd/spiders/jd_spider.py b/backend/template/spiders/jd/jd/spiders/jd_spider.py similarity index 100% rename from spiders/jd/jd/spiders/jd_spider.py rename to backend/template/spiders/jd/jd/spiders/jd_spider.py diff --git a/spiders/jd/scrapy.cfg b/backend/template/spiders/jd/scrapy.cfg similarity index 100% rename from spiders/jd/scrapy.cfg rename to backend/template/spiders/jd/scrapy.cfg diff --git a/spiders/juejin_node/juejin_spider.js b/backend/template/spiders/juejin_node/juejin_spider.js similarity index 100% rename from spiders/juejin_node/juejin_spider.js rename to backend/template/spiders/juejin_node/juejin_spider.js diff --git a/spiders/realestate/Spiderfile b/backend/template/spiders/realestate/Spiderfile similarity index 100% rename from spiders/realestate/Spiderfile rename to backend/template/spiders/realestate/Spiderfile diff --git a/spiders/realestate/realestate/__init__.py b/backend/template/spiders/realestate/realestate/__init__.py similarity index 100% rename from spiders/realestate/realestate/__init__.py rename to backend/template/spiders/realestate/realestate/__init__.py diff --git a/spiders/realestate/realestate/items.py b/backend/template/spiders/realestate/realestate/items.py similarity index 100% rename from spiders/realestate/realestate/items.py rename to backend/template/spiders/realestate/realestate/items.py diff --git a/spiders/realestate/realestate/middlewares.py b/backend/template/spiders/realestate/realestate/middlewares.py similarity index 100% rename from spiders/realestate/realestate/middlewares.py rename to backend/template/spiders/realestate/realestate/middlewares.py diff --git a/spiders/realestate/realestate/pipelines.py b/backend/template/spiders/realestate/realestate/pipelines.py similarity index 100% rename from spiders/realestate/realestate/pipelines.py rename to backend/template/spiders/realestate/realestate/pipelines.py diff --git a/spiders/realestate/realestate/settings.py b/backend/template/spiders/realestate/realestate/settings.py similarity index 100% rename from spiders/realestate/realestate/settings.py rename to backend/template/spiders/realestate/realestate/settings.py diff --git a/spiders/realestate/realestate/spiders/__init__.py b/backend/template/spiders/realestate/realestate/spiders/__init__.py similarity index 100% rename from spiders/realestate/realestate/spiders/__init__.py rename to backend/template/spiders/realestate/realestate/spiders/__init__.py diff --git a/spiders/realestate/realestate/spiders/lianjia.py b/backend/template/spiders/realestate/realestate/spiders/lianjia.py similarity index 100% rename from spiders/realestate/realestate/spiders/lianjia.py rename to backend/template/spiders/realestate/realestate/spiders/lianjia.py diff --git a/spiders/realestate/scrapy.cfg b/backend/template/spiders/realestate/scrapy.cfg similarity index 100% rename from spiders/realestate/scrapy.cfg rename to backend/template/spiders/realestate/scrapy.cfg diff --git a/spiders/segmentfault/segmentfault_spider.js b/backend/template/spiders/segmentfault/segmentfault_spider.js similarity index 100% rename from spiders/segmentfault/segmentfault_spider.js rename to backend/template/spiders/segmentfault/segmentfault_spider.js diff --git a/spiders/sinastock/Spiderfile b/backend/template/spiders/sinastock/Spiderfile similarity index 100% rename from spiders/sinastock/Spiderfile rename to backend/template/spiders/sinastock/Spiderfile diff --git a/spiders/sinastock/scrapy.cfg b/backend/template/spiders/sinastock/scrapy.cfg similarity index 100% rename from spiders/sinastock/scrapy.cfg rename to backend/template/spiders/sinastock/scrapy.cfg diff --git a/spiders/sinastock/sinastock/__init__.py b/backend/template/spiders/sinastock/sinastock/__init__.py similarity index 100% rename from spiders/sinastock/sinastock/__init__.py rename to backend/template/spiders/sinastock/sinastock/__init__.py diff --git a/spiders/sinastock/sinastock/items.py b/backend/template/spiders/sinastock/sinastock/items.py similarity index 100% rename from spiders/sinastock/sinastock/items.py rename to backend/template/spiders/sinastock/sinastock/items.py diff --git a/spiders/sinastock/sinastock/middlewares.py b/backend/template/spiders/sinastock/sinastock/middlewares.py similarity index 100% rename from spiders/sinastock/sinastock/middlewares.py rename to backend/template/spiders/sinastock/sinastock/middlewares.py diff --git a/spiders/sinastock/sinastock/pipelines.py b/backend/template/spiders/sinastock/sinastock/pipelines.py similarity index 100% rename from spiders/sinastock/sinastock/pipelines.py rename to backend/template/spiders/sinastock/sinastock/pipelines.py diff --git a/spiders/sinastock/sinastock/settings.py b/backend/template/spiders/sinastock/sinastock/settings.py similarity index 100% rename from spiders/sinastock/sinastock/settings.py rename to backend/template/spiders/sinastock/sinastock/settings.py diff --git a/spiders/sinastock/sinastock/spiders/__init__.py b/backend/template/spiders/sinastock/sinastock/spiders/__init__.py similarity index 100% rename from spiders/sinastock/sinastock/spiders/__init__.py rename to backend/template/spiders/sinastock/sinastock/spiders/__init__.py diff --git a/spiders/sinastock/sinastock/spiders/sinastock_spider.py b/backend/template/spiders/sinastock/sinastock/spiders/sinastock_spider.py similarity index 100% rename from spiders/sinastock/sinastock/spiders/sinastock_spider.py rename to backend/template/spiders/sinastock/sinastock/spiders/sinastock_spider.py diff --git a/spiders/sites_inspector/sites_inspector.py b/backend/template/spiders/sites_inspector/sites_inspector.py similarity index 100% rename from spiders/sites_inspector/sites_inspector.py rename to backend/template/spiders/sites_inspector/sites_inspector.py diff --git a/spiders/v2ex_config/Spiderfile b/backend/template/spiders/v2ex_config/Spiderfile similarity index 100% rename from spiders/v2ex_config/Spiderfile rename to backend/template/spiders/v2ex_config/Spiderfile diff --git a/spiders/xueqiu/Spiderfile b/backend/template/spiders/xueqiu/Spiderfile similarity index 100% rename from spiders/xueqiu/Spiderfile rename to backend/template/spiders/xueqiu/Spiderfile diff --git a/spiders/xueqiu/scrapy.cfg b/backend/template/spiders/xueqiu/scrapy.cfg similarity index 100% rename from spiders/xueqiu/scrapy.cfg rename to backend/template/spiders/xueqiu/scrapy.cfg diff --git a/spiders/xueqiu/xueqiu/__init__.py b/backend/template/spiders/xueqiu/xueqiu/__init__.py similarity index 100% rename from spiders/xueqiu/xueqiu/__init__.py rename to backend/template/spiders/xueqiu/xueqiu/__init__.py diff --git a/spiders/xueqiu/xueqiu/items.py b/backend/template/spiders/xueqiu/xueqiu/items.py similarity index 100% rename from spiders/xueqiu/xueqiu/items.py rename to backend/template/spiders/xueqiu/xueqiu/items.py diff --git a/spiders/xueqiu/xueqiu/middlewares.py b/backend/template/spiders/xueqiu/xueqiu/middlewares.py similarity index 100% rename from spiders/xueqiu/xueqiu/middlewares.py rename to backend/template/spiders/xueqiu/xueqiu/middlewares.py diff --git a/spiders/xueqiu/xueqiu/pipelines.py b/backend/template/spiders/xueqiu/xueqiu/pipelines.py similarity index 100% rename from spiders/xueqiu/xueqiu/pipelines.py rename to backend/template/spiders/xueqiu/xueqiu/pipelines.py diff --git a/spiders/xueqiu/xueqiu/settings.py b/backend/template/spiders/xueqiu/xueqiu/settings.py similarity index 100% rename from spiders/xueqiu/xueqiu/settings.py rename to backend/template/spiders/xueqiu/xueqiu/settings.py diff --git a/spiders/xueqiu/xueqiu/spiders/__init__.py b/backend/template/spiders/xueqiu/xueqiu/spiders/__init__.py similarity index 100% rename from spiders/xueqiu/xueqiu/spiders/__init__.py rename to backend/template/spiders/xueqiu/xueqiu/spiders/__init__.py diff --git a/spiders/xueqiu/xueqiu/spiders/xueqiu_spider.py b/backend/template/spiders/xueqiu/xueqiu/spiders/xueqiu_spider.py similarity index 100% rename from spiders/xueqiu/xueqiu/spiders/xueqiu_spider.py rename to backend/template/spiders/xueqiu/xueqiu/spiders/xueqiu_spider.py diff --git a/spiders/xueqiu_config/Spiderfile b/backend/template/spiders/xueqiu_config/Spiderfile similarity index 100% rename from spiders/xueqiu_config/Spiderfile rename to backend/template/spiders/xueqiu_config/Spiderfile diff --git a/spiders/zongheng_config/Spiderfile b/backend/template/spiders/zongheng_config/Spiderfile similarity index 100% rename from spiders/zongheng_config/Spiderfile rename to backend/template/spiders/zongheng_config/Spiderfile