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"]