feat: suporte a Linux e macOS - #5
Open
nicolasapr wants to merge 1 commit into
Open
Conversation
Previously the app ran on Windows only. Ports the Google Maps scraper integration and convenience tooling to Linux/macOS: - jobs.py: resolve the scraper binary and Node per platform (no hardcoded .exe or Windows Node path), overridable via GOOGLE_MAPS_SCRAPER_BIN / PLAYWRIGHT_NODEJS_PATH. Also read live progress from stderr, where the Linux scraper builds emit their JSON logs (the counter stayed at zero). - preparar_driver_playwright.sh: build the Playwright driver from the npm playwright-core package. The scraper's embedded playwright-go fetches the driver from the old azureedge CDN, now 404, so the browser never started. - iniciar.sh: Linux/macOS equivalent of iniciar.bat (backend + frontend). - Docs (README, CONTRIBUTING, CHANGELOG) updated for the three platforms, including the OS-specific scraper download and the driver-prep step. requirements: bump requests to 2.34.2 (matches the tested environment).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que muda
Hoje o ProspectOS roda só no Windows. Este PR porta o canal do Google Maps e o tooling de conveniência para Linux e macOS, sem alterar nada do comportamento no Windows.
Testado ponta a ponta no Linux (Debian, Python 3.13): busca do Google Maps subindo o navegador, progresso ao vivo e os 230 testes do backend passando.
Mudanças
backend/jobs.py— resolve o binário do scraper e o Node por plataforma (sem.exenem caminho fixo do Windows), com override porGOOGLE_MAPS_SCRAPER_BIN/PLAYWRIGHT_NODEJS_PATH. Passa a ler o progresso ao vivo também dostderr, onde as builds de Linux do scraper emitem os logs JSON — antes o contador ficava parado em zero.backend/preparar_driver_playwright.sh(novo) — monta o driver do Playwright a partir do pacote npmplaywright-core. Oplaywright-goembutido no scraper baixa o driver do CDN antigo (playwright.azureedge.net), hoje 404, então o navegador interno nunca subia no Linux/macOS. Idempotente e overridável porPLAYWRIGHT_GO_DRIVER_VERSION.iniciar.sh(novo) — equivalente Linux/macOS doiniciar.bat(sobe backend:5000+ frontend:5173, abre o navegador viaxdg-open/open).README,CONTRIBUTING,CHANGELOG) — atualizadas para as três plataformas, incluindo o download do scraper por SO e o passo de preparo do driver.requirements.txt—requests2.32.3 → 2.34.2 (versão do ambiente testado).Como testar no Linux/macOS
linux-amd64/darwindo google-maps-scraper, renomear paragoogle-maps-scraperechmod +x.cd backend && ./preparar_driver_playwright.sh./iniciar.shna raiz e disparar uma busca no canal Google Maps.Sem o passo 2, a busca falha com "não conseguiu iniciar o navegador interno" — a mensagem de erro agora orienta exatamente isso.