Files
my-botty/tools/run_continuous_scrape.bat
alexpolo1 c26f249268 fix(input): snap cursor to exact target before click (SetCursorPos can land 1-2px off)
D2R UI hitboxes are tight; a 1px offset on the Join Game tab click was
enough to miss the button. Final SetCursorPos pass after the existing
verification check.
2026-08-25 00:26:44 +02:00

41 lines
1.8 KiB
Batchfile

@echo off
REM Continuous D2R Price Scrape - runs all night
REM Scrape every 30 minutes, push to .96
setlocal
set PYTHON=C:\Python313\python.exe
set REPO=C:\Users\alex\my-botty
set LOG=%REPO%\log\fg_scrape_continuous.log
set INTERVAL=1800 REM 30 minutes in seconds
echo ==========================================>> "%LOG%"
echo [%date% %time%] Starting continuous price scrape>> "%LOG%"
echo ==========================================>> "%LOG%"
:loop
cd /d "%REPO%"
echo [%date% %time%] Running scrape cycle...>> "%LOG%"
REM Scrape d2jsp
"%PYTHON%" tools\playwright_fg_scraper.py --max-forum-pages 40 --max-topics 800 --delay-s 0.5 >> "%LOG%" 2>&1
REM Parse d2jsp
"%PYTHON%" tools\fg_market_scraper.py --offline-dir data/d2jsp_pages --ladder-start-date 2026-05-12 --days 60 >> "%LOG%" 2>&1
REM Scrape Traderie
"%PYTHON%" tools\traderie_price_scraper.py >> "%LOG%" 2>&1
REM Push to .96
scp -o StrictHostKeyChecking=no -r data/d2jsp_pages/* alex@192.168.1.96:/tmp/d2jsp_pages/ >> "%LOG%" 2>&1
scp -o StrictHostKeyChecking=no config/daily_prices.json alex@192.168.1.96:/tmp/ >> "%LOG%" 2>&1
scp -o StrictHostKeyChecking=no config/fg_daily_estimates.json alex@192.168.1.96:/tmp/ >> "%LOG%" 2>&1
ssh -o StrictHostKeyChecking=no alex@192.168.1.96 "sudo mkdir -p /opt/d2r-prices/data/d2jsp_pages /opt/d2r-prices/config && sudo cp /tmp/d2jsp_pages/* /opt/d2r-prices/data/d2jsp_pages/ 2>/dev/null; sudo cp /tmp/daily_prices.json /opt/d2r-prices/config/ 2>/dev/null; sudo cp /tmp/fg_daily_estimates.json /opt/d2r-prices/config/ 2>/dev/null; sudo rm -rf /tmp/d2jsp_pages /tmp/daily_prices.json /tmp/fg_daily_estimates.json; sudo /opt/d2r-prices/run_scrape.sh" >> "%LOG%" 2>&1
echo [%date% %time%] Cycle complete. Waiting %INTERVAL% seconds...>> "%LOG%"
REM Wait 30 minutes
timeout /t %INTERVAL% /nobreak >nul
goto loop