This commit is contained in:
Manchik
2026-05-15 17:17:42 +03:00
parent 13dc22f74f
commit 9cce9b5b36
16 changed files with 332 additions and 108 deletions
+9 -7
View File
@@ -33,20 +33,22 @@ if errorlevel 1 (
venv\Scripts\pip.exe install -r requirements.txt
if errorlevel 1 goto :err_deps
echo Dependencies installed.
rem === Patch nodriver/cdp/network.py encoding bug (non-UTF-8 byte in comment) ===
venv\Scripts\python.exe -c "import pathlib; p=pathlib.Path('venv/Lib/site-packages/nodriver/cdp/network.py'); d=p.read_bytes() if p.exists() else b''; p.write_bytes(d.replace(b'\xb1',b'+-')) if p.exists() and b'\xb1' in d else None"
) else (
echo Dependencies OK.
)
rem === Ensure psutil is installed (required for browser process monitoring) ===
venv\Scripts\pip.exe show psutil >nul 2>&1
if errorlevel 1 (
echo Installing psutil...
venv\Scripts\pip.exe install psutil>=6.0.0 -q
)
:launch
cls
rem === Patch nodriver/cdp/network.py encoding bug (non-UTF-8 byte \xb1 in comment) ===
venv\Scripts\python.exe -c ^
"import pathlib;^
p=pathlib.Path('venv/Lib/site-packages/nodriver/cdp/network.py');^
d=p.read_bytes() if p.exists() else b'';^
p.write_bytes(d.replace(b'\xb1',b'+-')) if p.exists() and b'\xb1' in d else None"
rem === Check built frontend ===
if not exist "app\static\assets\" (
echo.