Usagi-org/ai-goofish-monitor implements real-time, multi-task monitoring of Xianyu (闲鱼) listings using Playwright for browser automation and multimodal LLMs for semantic product analysis. The system exposes a FastAPI backend with a Vite-built Web UI (default port 8000) for task orchestration, account management, AI prompt editing, log inspection, and result browsing. Each monitoring task runs as an independent process configurable via keywords, price ranges, release-time windows, and three-level province/city/district region filters sourced from Xianyu page snapshots. Tasks bind to specific Xianyu accounts — authenticated via Chrome-extension-exported cookie JSON stored in state/ — or rely on automatic account/proxy rotation with configurable retry limits (PROXY_ROTATION_RETRY_LIMIT), blacklist TTL (PROXY_BLACKLIST_TTL), and failure thresholds (TASK_FAILURE_THRESHOLD, TASK_FAILURE_PAUSE_SECONDS). AI-driven tasks accept natural-language requirements, asynchronously generating analysis standards via a background job (POST /api/tasks/generate returns 202 with job_id; progress polled via GET /api/tasks/generate-jobs/{job_id}), while keyword-mode tasks create immediately. Product detail pages and images are scraped, analyzed by the configured vision-capable model (OPENAI_MODEL_NAME at OPENAI_BASE_URL), and matching results trigger notifications over ntfy.sh, Gotify, Bark, WeCom, Telegram, or generic webhooks. Persistence uses SQLite (data/app.sqlite3, overridable via APP_DATABASE_FILE) with automatic migration from legacy config.json, jsonl/, and price_history/ on first run; images/, logs/, prompts/, and state/ remain filesystem directories. Deployment options include Docker (ghcr.io/usagi-org/ai-goofish:latest with bundled Chromium) or direct execution via start.sh (Python 3.10+, Node.js 20.18.3+, Playwright CLI). Scheduling supports cron expressions. Default Web UI credentials are admin/admin123 (WEB_USERNAME/WEB_PASSWORD).
Read original
github-trending/python