Загрузка данных


import sys
sys.path.insert(0, os.path.join(BASE_PATH, "max"))
try:
    import max_reader as _max
    _max.BASE_PATH   = BASE_PATH
    _max.DB_FILE     = DB_FILE
    _max.REPORTS_DIR = REPORTS_DIR
    _max.MAX_BOT_DB  = os.path.join(BASE_PATH, "max_bot.db")
    _max.STATE_FILE  = os.path.join(BASE_PATH, "max", "max_state.json")
    _max.PROFILE_DIR = os.path.join(BASE_PATH, "max", "max_browser_profile")
    threading.Thread(target=_max.run, kwargs={"headless": True},
                     daemon=True, name="MaxReader").start()
    print("[MAX] Max Reader запущен")
except Exception as _e:
    print(f"[MAX] Ошибка: {_e}")