-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy pathstart-librecrawl.bat
More file actions
63 lines (53 loc) · 1.47 KB
/
start-librecrawl.bat
File metadata and controls
63 lines (53 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@echo off
echo Checking for Docker...
docker --version 2>nul
if errorlevel 1 goto nodocker
echo Docker found! Starting LibreCrawl...
docker compose up -d
timeout /t 3 /nobreak >nul
echo.
echo ================================================================================
echo LibreCrawl is running!
echo Opening browser to http://localhost:5000
echo.
echo Press Ctrl+C to stop LibreCrawl
echo DO NOT close this window or LibreCrawl will keep running!
echo ================================================================================
echo.
start http://localhost:5000
docker compose logs -f
docker compose down
exit /b
:nodocker
echo Docker not found. Checking for Python...
python --version 2>nul
if errorlevel 1 goto trypy
:foundpython
echo Python found! Checking dependencies...
pip show flask 2>nul
if errorlevel 1 goto installdeps
:rundirect
echo Starting LibreCrawl...
start /b cmd /c "timeout /t 2 /nobreak >nul && start http://localhost:5000"
python main.py -l
exit /b
:trypy
py --version 2>nul
if errorlevel 1 goto nopython
set PYTHON=py
goto foundpython
:installdeps
echo Installing dependencies...
pip install -r requirements.txt
playwright install chromium
goto rundirect
:nopython
echo.
echo ERROR: Neither Docker nor Python found!
echo.
echo Please install one of:
echo - Docker Desktop: https://www.docker.com/products/docker-desktop
echo - Python 3.11+: https://www.python.org/downloads/
echo.
pause
exit /b 1