How victorfernandesraton/vagabot works
Project type and purpose
• This is a Python-based CLI automation tool (“Vagabot”) that uses Selenium to:
a) search LinkedIn posts matching a query
b) extract authors and post data
c) comment on posts the user hasn’t yet interacted with
• It runs as a Dockerized worker container talking to a Selenium Grid and persisting results in a local SQLite file.
File structure
• Top-level:
• script.py (CLI entrypoint)
• Dockerfile, docker-compose.yml (container + Selenium Grid)
• pyproject.toml / requirements.txt (Python deps)
• env-example (env var specification)
• Core package “vagabot”:
• workflows/ – orchestration of LinkedIn flows (login, search, comment)
• services/ – RemoteBrowserService wraps Selenium WebDriver remote calls
• adapters/ – HTML → domain entity mapping (post search adapter)
• repository/ – Repository pattern over SQLite (post + author)
• entities.py – Post and Author data models
• Tests mirror these layers under tests/.
Read README for additional insights
• CLI commands:
• search-posts
• post-comment
• Requires Docker Compose (worker + Selenium Hub + Node(s)).
• Environment variables for LinkedIn credentials, DB filename, Selenium Grid host/port.
Diagramming recommendations
• e.g., blue for CLI/Workflow, green for Service, yellow for Adapter, brown for Repository, orange for Data Store, red for external systems
• “Worker Container” housing CLI, workflows, services, adapters, repositories
• “Selenium Grid Network” housing Hub + Node
Essential details to capture
• The flow of credentials and queries from CLI args or environment into workflows
• The back-and-forth between RemoteBrowserService and the Selenium Grid over HTTP
• The transformation step in the adapter layer (raw HTML → Entities)
• Persistence calls from repository layer to SQLite
• How the post-comment workflow retrieves stored posts, sends browser commands, and updates state