| | |
| | | import sys |
| | | import os |
| | | import asyncio |
| | | import aiohttp |
| | | import traceback |
| | | import time |
| | | from Util.random_util import RandomUtil # 你已有的工具 |
| | | from Util.dingtalk_helper import DingTalkHelper |
| | | from tqdm import tqdm |
| | | import logging |
| | | |
| | | def get_parent_directory(file_path, levels=1): |
| | | """获取指定层级的父目录""" |
| | | path = os.path.abspath(file_path) |
| | | for _ in range(levels): |
| | | path = os.path.dirname(path) |
| | | return path |
| | | parent_dir = get_parent_directory(__file__, 5) # 获取上五级目录 |
| | | sys.path.append(parent_dir) |
| | | |
| | | from 测试组.脚本.造数脚本2.Util.random_util import RandomUtil |
| | | from 测试组.脚本.造数脚本2.Util.dingtalk_helper import DingTalkHelper |
| | | |
| | | |
| | | # 钉钉机器人 access_token 和 secret |
| | | ACCESS_TOKEN = '4625f6690acd9347fae5b3a05af598be63e73d604b933a9b3902425b8f136d4d' |
| | | SECRET = 'SEC3b6937550bd297b5491855f6f40c2ff1b41bc8c495e118ba9848742b1ddf8f19' |