You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
jack 2c0019254d first commit 4 weeks ago
ai_news first commit 4 weeks ago
archive first commit 4 weeks ago
base first commit 4 weeks ago
daily first commit 4 weeks ago
demo first commit 4 weeks ago
manual first commit 4 weeks ago
message first commit 4 weeks ago
remind first commit 4 weeks ago
spider first commit 4 weeks ago
test first commit 4 weeks ago
utils first commit 4 weeks ago
.gitignore first commit 4 weeks ago
README.md first commit 4 weeks ago
config.json first commit 4 weeks ago
requirements.txt first commit 4 weeks ago
restart_auto.sh first commit 4 weeks ago

README.md

auto

1,定时爬取各种新闻 存到mongodb

2,使用无头浏览器,监测指定数据, 通过gotify或serverchan推送信息 可选使用mongodb存历史数据,判断当次数据和历史数据是否相同, 不相同或增加或减少时,发送消息

3,定时推送消息,用于提醒,包含爬虫,但连接mongodb, 可设置推送提醒次数

4,推送简短消息(gotify)

通过青龙面板执行定时任务

初始化之后, 创建一下脚本, 用于更新代码和重启docker服务

#!/bin/bash

# 定义一个函数来检查上一个命令是否执行成功
check_status() {
    if [ $? -eq 0 ]; then
        echo "操作成功: $1"
    else
        echo "操作失败: $1"
        exit 1
    fi
}

# 切换到auto的source目录并更新代码
cd ~/apps/auto/source/auto
check_status "切换到目录 ~/auto/source/auto"

git reset --hard
git pull
check_status "执行 git pull"

# 切换到auto目录并重启docker服务
cd ~/apps/auto
check_status "切换到目录 ~/apps/auto"

docker-compose restart
check_status "重启 docker-compose 服务"

echo "所有操作已完成。"