feat(bizin): scraper final com bypass Cloudflare + monitor de auto-reinício
- bizin_scraper_final.py: scraper híbrido curl_cffi + undetected-chromedriver com suporte a distritos e categorias, escrita segura (fsync) e enriquecimento externo - monitor_scraper.sh: watchdog que reinicia o processo automaticamente em crash - IMPLEMENTADO.md + README.md: actualizados para reflectir estado Abril 2026 - GEMINI.md: instruções técnicas de automação - test_curl.py, test_curl_clean.py, test_playwright.py: scripts de teste/diagnóstico Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# monitor_scraper.sh
|
||||
|
||||
SCRIPT_PATH="./bizin_scraper_final.py"
|
||||
PYTHON_PATH="./venv/bin/python"
|
||||
LOG_PATH="./logs/bizin_final.log"
|
||||
|
||||
echo "🤖 Iniciando monitorização do scraper Bizin..."
|
||||
|
||||
while true; do
|
||||
if ! ps aux | grep -v grep | grep "bizin_scraper_final.py" > /dev/null; then
|
||||
echo "⚠️ Scraper parou às $(date). Reiniciando..."
|
||||
$PYTHON_PATH $SCRIPT_PATH >> $LOG_PATH 2>&1 &
|
||||
sleep 10
|
||||
fi
|
||||
sleep 30
|
||||
done
|
||||
Reference in New Issue
Block a user