From 03d32c797cc6addd47de222321bb6d1d43de852a Mon Sep 17 00:00:00 2001 From: "steve.gao" Date: Tue, 11 Feb 2025 11:45:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E3=80=81=E5=AE=9A=E6=97=B6=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clean.py | 4 ++-- tg_module/receive_message.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/clean.py b/clean.py index 4306443..c337f1f 100644 --- a/clean.py +++ b/clean.py @@ -7,8 +7,8 @@ import shutil """ 定时脚本删除目标目录下文件 暂定每日执行一次 删除一天前的文件 -0 0 * * * cd /opt/crawl/telegram/telegram-crawler && /root/anaconda3/envs/python3.8/bin/python clean.py > /dev/null 2>&1 -cd /opt/crawl/telegram/telegram-crawler && /root/anaconda3/envs/python3.8/bin/python clean.py > /dev/null 2>&1 +0 0 * * * conda activate python3.8 && cd /opt/crawl/telegram/telegram_crawler && python clean.py > /dev/null 2>&1 +conda activate python3.8 && cd /opt/crawl/telegram/telegram_crawler && python clean.py > /dev/null 2>&1 """ diff --git a/tg_module/receive_message.py b/tg_module/receive_message.py index 550178d..fe7cee7 100644 --- a/tg_module/receive_message.py +++ b/tg_module/receive_message.py @@ -190,7 +190,8 @@ async def main(session_string, api_id, api_hash, kp=None, message_topic=""): async def mul_account(): client_mysql = MysqlPoolClient(CRAWLER_DB_CONF) - sql = f"select * from {TG_ROBOT_ACCOUNT_TABLE} where api_id!='28340634' order by update_time" + # 排除 18443104914(有效)、18846824798(无效) 账号 + sql = f"select * from {TG_ROBOT_ACCOUNT_TABLE} where api_id='22955009' order by update_time" results = client_mysql.getAll(sql) kp = SKafka(bootstrap_servers=TOPIC_ADDRESS) message_topic = TOPIC_DIC["testtelegram"]