From eeb879a293ce1c6ad121e36bbc7d8eab5f9900ec Mon Sep 17 00:00:00 2001 From: sophon Date: Sat, 12 Jul 2025 13:59:02 +0800 Subject: [PATCH] modify scripts --- scrapy_proj/cmd.txt | 54 +++++++++++++++++++ .../scrapy_proj/extensions/push_to_wecom.sh | 4 +- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 scrapy_proj/cmd.txt diff --git a/scrapy_proj/cmd.txt b/scrapy_proj/cmd.txt new file mode 100644 index 0000000..1c0583f --- /dev/null +++ b/scrapy_proj/cmd.txt @@ -0,0 +1,54 @@ +1010 scrapy crawl iafd -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1011 scrapy crawl u3c3 -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1012 scrapy crawl iafd -a debug=1 cmd=performers -s STATS_EXPORT_INTERVAL=60 + 1014 scrapy crawl --help + 1015 scrapy crawl iafd -a debug=1 -a cmd=performers -s STATS_EXPORT_INTERVAL=60 + 1016 scrapy crawl u3c3 -s STATS_EXPORT_INTERVAL=60 -s DEBUG=True + 1017 scrapy crawl u3c3 -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1018 scrapy crawl iafd -a debug=1 -a cmd=performers -s STATS_EXPORT_INTERVAL=60 + 1019 scrapy crawl u3c3 -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1020 scrapy crawl u3c3 + 1021 scrapy crawl u3c3 -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1022 scrapy crawl u3c3 -a debug=1 -s STATS_EXPORT_INTERVAL=60 -s LOG_LEVEL=DEBUG + 1023 scrapy crawl u3c3 -a debug=1 -s STATS_EXPORT_INTERVAL=60 -s LOG_LEVEL='DEBUG' + 1024 scrapy crawl u3c3 -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1025 scrapy crawl sis -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1026 scrapy crawl sis -a debug=1 -s STATS_EXPORT_INTERVAL=60 -s LOG_LEVEL='DEBUG' + 1027 scrapy crawl sis -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1028 scrapy crawl iafd -a debug=1 -a cmd=performers -s STATS_EXPORT_INTERVAL=60 + 1029 scrapy crawl --help + 1034 cd projects/resources/scrapy_proj/ + 1037 scrapy crawl sis + 1038 scrapy crawl sis -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1039 scrapy crawl iafd -a debug=1 -a cmd=performers -s STATS_EXPORT_INTERVAL=60 + 1040 scrapy crawl u3c3 -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1041 scrapy crawl iafd -a debug=1 -a cmd=performers -s STATS_EXPORT_INTERVAL=60 + 1042 scrapy crawl sis -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1043 scrapy crawl sis + 1044 scrapy crawl sis -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1045 scrapy crawl iafd -a debug=1 -a cmd=performers -s STATS_EXPORT_INTERVAL=60 + 1046 scrapy crawl sis -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1047 scrapy crawl u3c3 -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1048 scrapy crawl u3c3 -a begin=2025-07-04 + 1049 scrapy crawl u3c3 -a begin='2025-07-04' + 1050 scrapy crawl sis -a begin='2025-07-04' + 1051 scrapy crawl u3c3 -a begin='2025-07-04' + 1052 scrapy crawl sis -a begin='2025-07-04' + 1053 scrapy crawl u3c3 -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1054 scrapy crawl sis -a debug=1 -s STATS_EXPORT_INTERVAL=60 + 1055 scrapy crawl iafd -a debug=1 -a cmd=performers -s STATS_EXPORT_INTERVAL=60 + 1056 scrapy crawl u3c3 -a debug=1 -s STATS_EXPORT_INTERVAL=60 -s LOG_LEVEL=DEBUG + 1057 scrapy crawl iafd -a debug=1 -a cmd=performers -s STATS_EXPORT_INTERVAL=60 -s LOG_LEVEL=DEBUG + 1058 scrapy crawl pbox -s LOG_LEVEL=DEBUG + 1059 scrapy crawl pbox + 1060 scrapy crawl pbox -a debug=1 + 1061 scrapy crawl pbox -a debug=1 -s LOG_LEVEL=DEBUG + 1064 scrapy crawl pbox -a debug=1 -s LOG_LEVEL=DEBUG + 1067 scrapy crawl pbox -a debug=1 -s LOG_LEVEL=DEBUG + 1068 scrapy crawl pbox -a debug=1 + 1070 scrapy crawl pbox -a debug=1 cmd=studio + 1071 scrapy crawl pbox -a debug=1 -a cmd=studio + 1072 scrapy crawl pbox -a debug=1 -a cmd=movies + 1073 scrapy crawl pbox -a debug=1 -a cmd=studio + 1074 scrapy crawl pbox -a debug=1 -a cmd=movies + 1094 sqlite3 ~/sharedata/sqlite/scrapy.db '.schema' > ./sqlite_tools/scrapy_db_schema.sql \ No newline at end of file diff --git a/scrapy_proj/scrapy_proj/extensions/push_to_wecom.sh b/scrapy_proj/scrapy_proj/extensions/push_to_wecom.sh index 81d37de..e25d91d 100755 --- a/scrapy_proj/scrapy_proj/extensions/push_to_wecom.sh +++ b/scrapy_proj/scrapy_proj/extensions/push_to_wecom.sh @@ -12,7 +12,7 @@ YELLOW='\033[0;33m' NC='\033[0m' # 无颜色 REMOTE_SERVER="101.33.230.186" -REMOTE_USER="root" +REMOTE_USER="ubuntu" SSH_OTRS="-o StrictHostKeyChecking=no -o ConnectTimeout=10" # 主函数 @@ -25,7 +25,7 @@ main() { fi # 调用远程脚本并传递结果 - ssh $SSH_OTRS $REMOTE_USER@$REMOTE_SERVER "cd /root/projects/devops/tools; python3 ./send_to_wecom.py '$result'" + ssh $SSH_OTRS $REMOTE_USER@$REMOTE_SERVER "cd /home/ubuntu/projects/devops/tools; python3 ./send_to_wecom.py '$result'" return $? # 返回远程命令的执行状态 }