|
|
@@ -4,7 +4,7 @@ import os
|
|
|
import requests
|
|
|
|
|
|
# 青龙面板的地址
|
|
|
-url = "https://ql-message.erhe.top"
|
|
|
+url = "https://auto.erhe.top"
|
|
|
|
|
|
|
|
|
# 登录青龙面板
|
|
|
@@ -74,9 +74,7 @@ def main():
|
|
|
print("Tasks list is empty")
|
|
|
|
|
|
project_path = '/ql/data/scripts/auto/'
|
|
|
- spider_common_path = os.path.join(project_path, 'spider_common')
|
|
|
- spider_news_path = os.path.join(project_path, 'spider_news')
|
|
|
- spider_rsshub_path = os.path.join(project_path, 'spider_rsshub')
|
|
|
+ spider_path = os.path.join(project_path, 'spider')
|
|
|
utils_path = os.path.join(project_path, 'utils')
|
|
|
message_path = os.path.join(project_path, 'message')
|
|
|
rss_data_path = os.path.join(project_path, 'rss_data_handel')
|
|
|
@@ -107,58 +105,48 @@ def main():
|
|
|
"labels": ["base"]
|
|
|
}
|
|
|
],
|
|
|
- 'spider_common_tasks': [
|
|
|
- {
|
|
|
- "name": "自动执行dlt爬虫",
|
|
|
- "command": "python3 {}/spider_get_and_check_dlt.py".format(spider_common_path),
|
|
|
- "schedule": "30 22 * * 1,3,6",
|
|
|
- "labels": ["spider_common"]
|
|
|
- }
|
|
|
- ],
|
|
|
- 'spider_news': [
|
|
|
+ 'spider': [
|
|
|
{
|
|
|
"name": "自动执行反斗限免爬虫",
|
|
|
- "command": "python3 {}/news_get_apprcn.py".format(spider_news_path),
|
|
|
+ "command": "python3 {}/news_get_apprcn.py".format(spider_path),
|
|
|
"schedule": "0 0 3,6,9,12,15,18,21 * * *",
|
|
|
"labels": ["spider-common"]
|
|
|
},
|
|
|
{
|
|
|
"name": "自动执行chiphell爬虫",
|
|
|
- "command": "python3 {}/news_get_chiphell.py".format(spider_news_path),
|
|
|
+ "command": "python3 {}/news_get_chiphell.py".format(spider_path),
|
|
|
"schedule": "0 0 3,6,9,12,15,18,21 * * *",
|
|
|
"labels": ["spider-common"]
|
|
|
},
|
|
|
{
|
|
|
"name": "自动执行hello_github爬虫",
|
|
|
- "command": "python3 {}/news_get_hello_github.py".format(spider_news_path),
|
|
|
+ "command": "python3 {}/news_get_hello_github.py".format(spider_path),
|
|
|
"schedule": "0 0 3,6,9,12,15,18,21 * * *",
|
|
|
"labels": ["spider-common"]
|
|
|
},
|
|
|
{
|
|
|
"name": "自动执行Anyknew爬虫",
|
|
|
- "command": "python3 {}/news_get_news.py".format(spider_news_path),
|
|
|
+ "command": "python3 {}/news_get_news.py".format(spider_path),
|
|
|
"schedule": "0 0 3,6,9,12,15,18,21 * * *",
|
|
|
"labels": ["spider-common"]
|
|
|
},
|
|
|
{
|
|
|
"name": "自动执行币界网文章爬虫",
|
|
|
- "command": "python3 {}/spider_web3_coin_world.py".format(spider_news_path),
|
|
|
+ "command": "python3 {}/spider_web3_coin_world.py".format(spider_path),
|
|
|
"schedule": "0 0 3,6,9,12,15,18,21 * * *",
|
|
|
"labels": ["spider-common"]
|
|
|
},
|
|
|
{
|
|
|
"name": "获取 web3 新闻",
|
|
|
- "command": "python3 {}/spider_web3_news.py".format(spider_news_path),
|
|
|
+ "command": "python3 {}/spider_web3_news.py".format(spider_path),
|
|
|
"schedule": "0 0 3,6,9,12,15,18,21 * * *",
|
|
|
"labels": ["spider-common"]
|
|
|
},
|
|
|
- ],
|
|
|
- 'spider_rsshub_tasks': [
|
|
|
{
|
|
|
- "name": "自动执行 rsshub 爬虫",
|
|
|
- "command": "python3 {}/rsshub_spider.py".format(spider_rsshub_path),
|
|
|
- "schedule": "0 0 3,6,9,12,15,18,21 * * *",
|
|
|
- "labels": ["spider-rsshub"]
|
|
|
+ "name": "自动执行dlt爬虫",
|
|
|
+ "command": "python3 {}/spider_get_and_check_dlt.py".format(spider_path),
|
|
|
+ "schedule": "30 22 * * 1,3,6",
|
|
|
+ "labels": ["spider_common"]
|
|
|
}
|
|
|
],
|
|
|
'message_tasks': [
|
|
|
@@ -185,16 +173,14 @@ def main():
|
|
|
"command": "python3 {}/message_get_one_week_weather.py".format(message_path),
|
|
|
"schedule": "0 0 6,22 * * *",
|
|
|
"labels": ["message"]
|
|
|
- }
|
|
|
- ],
|
|
|
- 'rss_data': [
|
|
|
+ },
|
|
|
{
|
|
|
"name": "从 freshrss-psql 数据库中读取数据并发送",
|
|
|
- "command": "python3 {}/rss_data_handel_main.py".format(rss_data_path),
|
|
|
+ "command": "python3 {}/message_rss_data_handel.py".format(rss_data_path),
|
|
|
"schedule": "30 6,9,12,18,22 * * *",
|
|
|
"labels": ["message"]
|
|
|
},
|
|
|
- ]
|
|
|
+ ],
|
|
|
}]
|
|
|
|
|
|
for task_template in tasks_template:
|