This commit is contained in:
HuangHai
2026-01-14 07:37:15 +08:00
parent 1bdfde98c6
commit 77f5e80857
10 changed files with 110 additions and 71 deletions

View File

@@ -9,21 +9,16 @@ project_root = os.path.dirname(os.path.abspath(__file__))
if project_root not in sys.path:
sys.path.append(project_root)
# 配置日志
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
logger = logging.getLogger("T1_XinDianTu")
try:
from Apps.XinDianTu.Service import XinDianTuService
from Apps.XinDianTu import Opener, Crawler, Kit
# 配置日志
logger = Kit.setup_logger("T1_XinDianTu", clear_old_log=True)
except KeyboardInterrupt:
logger.info("\n🛑 用户在初始化阶段手动停止了程序。")
print("\n🛑 用户在初始化阶段手动停止了程序。")
sys.exit(0)
except Exception as e:
logger.error(f"❌ 初始化导入失败: {e}")
print(f"❌ 初始化导入失败: {e}")
sys.exit(1)
async def run_process():