-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_api.bat
More file actions
56 lines (46 loc) Β· 1.97 KB
/
run_api.bat
File metadata and controls
56 lines (46 loc) Β· 1.97 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
@echo off
title Google Maps Scraper API
color 0A
echo.
echo βββββββββββββββββββββββββββββββββββββββββββββββββββββ
echo β GOOGLE MAPS SCRAPER API β
echo β By: dewhush β
echo βββββββββββββββββββββββββββββββββββββββββββββββββββββ
echo.
REM Check Python installation
python --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python is not installed or not in PATH
pause
exit /b 1
)
REM Check if virtual environment exists
if not exist "venv" (
echo [SETUP] Creating virtual environment...
python -m venv venv
)
REM Activate virtual environment
call venv\Scripts\activate.bat
REM Install dependencies
echo [SETUP] Installing dependencies...
pip install fastapi uvicorn python-dotenv playwright pydantic beautifulsoup4 -q
REM Install Playwright browsers
echo [SETUP] Installing browser...
playwright install chromium >nul 2>&1
REM Check if .env exists
if not exist ".env" (
echo [INFO] Creating .env from template...
copy .env.example .env >nul 2>&1
)
echo.
echo βββββββββββββββββββββββββββββββββββββββββββββββββββββ
echo β Starting Scraper API... β
echo β β
echo β Local: http://localhost:8000 β
echo β Docs: http://localhost:8000/docs β
echo β β
echo β Press Ctrl+C to stop β
echo βββββββββββββββββββββββββββββββββββββββββββββββββββββ
echo.
python api.py
pause