ai-goofish-monitor
WorkflowFree基于 Playwright 和AI实现的闲鱼多任务实时/定时监控与智能分析系统,配备了功能完善的后台管理UI。帮助用户从闲鱼海量商品中,找到心仪产品。
Capabilities13 decomposed
concurrent multi-task marketplace monitoring with playwright automation
Medium confidenceExecutes parallel web scraping tasks against Xianyu marketplace using Playwright browser automation (spider_v2.py), with concurrent task execution managed through Python asyncio. Each task maintains independent browser sessions, cookie/session state, and can be scheduled via cron expressions or triggered in real-time. The system handles login automation, dynamic content loading, and anti-bot detection through configurable delays and user-agent rotation.
Uses Playwright's native async/await patterns with independent browser contexts per task (spider_v2.py), enabling true concurrent scraping without thread management overhead. Integrates task-level cron scheduling directly into the monitoring loop rather than relying on external schedulers, reducing deployment complexity.
Faster concurrent execution than Selenium-based scrapers due to Playwright's native async architecture; simpler than Scrapy for stateful browser automation tasks requiring login and session persistence.
multimodal ai product analysis with image and text processing
Medium confidenceAnalyzes scraped product listings using multimodal LLMs (OpenAI GPT-4V or Google Gemini) through src/ai_handler.py. Encodes product images to base64, combines them with text descriptions and task-specific prompts, and sends to AI APIs for intelligent filtering. The system manages prompt templates (base_prompt.txt + task-specific criteria files), handles API response parsing, and extracts structured recommendations (match score, reasoning, action flags).
Implements task-specific prompt injection through separate criteria files (prompts/*.txt) combined with base prompts, enabling non-technical users to customize AI behavior without code changes. Uses AsyncOpenAI for concurrent product analysis, processing multiple products in parallel while respecting API rate limits through configurable batch sizes.
More flexible than keyword-based filtering (handles subjective criteria like 'good condition'); cheaper than human review workflows; faster than sequential API calls due to async batching.
docker containerization with multi-stage builds and environment isolation
Medium confidenceProvides Docker configuration (Dockerfile, docker-compose.yml) for containerized deployment with isolated environment, dependency management, and reproducible builds. The system uses multi-stage builds to minimize image size, includes Playwright browser installation, and supports environment variable injection via .env file. Docker Compose orchestrates the service with volume mounts for config persistence and port mapping for web UI access.
Uses multi-stage Docker builds to separate build dependencies from runtime dependencies, reducing final image size. Includes Playwright browser installation in Docker, eliminating the need for separate browser setup steps and ensuring consistent browser versions across deployments.
Simpler than Kubernetes-native deployments (single docker-compose.yml); reproducible across environments vs local Python setup; faster than VM-based deployments due to container overhead.
error handling and retry logic with exponential backoff
Medium confidenceImplements resilient error handling throughout the system with exponential backoff retry logic for transient failures (network timeouts, API rate limits, temporary service unavailability). Playwright scraping includes retry logic for page load failures and element not found errors. AI API calls include retry logic for rate limit (429) and server error (5xx) responses. Failed tasks log detailed error traces for debugging and continue processing remaining tasks.
Implements exponential backoff retry logic at multiple levels (Playwright page loads, AI API calls, notification deliveries) with consistent error handling patterns across the codebase. Distinguishes between transient errors (retryable) and permanent errors (fail-fast), reducing unnecessary retries for unrecoverable failures.
More resilient than no retry logic (handles transient failures); simpler than circuit breaker pattern (suitable for single-instance deployments); exponential backoff prevents thundering herd vs fixed-interval retries.
system health monitoring and status reporting
Medium confidenceProvides health check endpoints (/api/health, /api/status/*) that report system status including API connectivity, configuration validity, last task execution time, and service uptime. The system monitors critical dependencies (OpenAI/Gemini API, Xianyu marketplace, notification services) and reports their availability. Status endpoint includes configuration summary, active task count, and system resource usage (memory, CPU).
Implements comprehensive health checks for all critical dependencies (AI APIs, Xianyu marketplace, notification services) in a single endpoint, providing a unified view of system health. Includes configuration validation checks that verify API keys are present and task definitions are valid.
More comprehensive than simple liveness probes (checks dependencies, not just process); simpler than full observability stacks (Prometheus, Grafana); built-in vs external monitoring tools.
multi-channel notification delivery with intelligent routing
Medium confidenceRoutes AI-generated product recommendations to users through multiple notification channels (ntfy.sh, WeChat, Bark, Telegram, custom webhooks) configured in src/config.py. Each notification includes product details, AI reasoning, and action links. The system supports channel-specific formatting, retry logic for failed deliveries, and notification deduplication to avoid spamming users with duplicate matches.
Implements channel-agnostic notification abstraction with pluggable handlers for each platform, allowing new channels to be added without modifying core logic. Supports task-level notification routing (different tasks can use different channels) and deduplication based on product ID + task combination.
More flexible than single-channel solutions (e.g., email-only); supports Chinese platforms (WeChat, Bark) natively; simpler than building separate integrations for each notification service.
task lifecycle management via rest api with real-time logging
Medium confidenceProvides FastAPI-based REST endpoints (/api/tasks/*) for creating, reading, updating, and deleting monitoring tasks. Each task is persisted to config.json with metadata (keywords, price filters, cron schedule, prompt reference, notification channels). The system streams real-time execution logs via Server-Sent Events (SSE) at /api/logs/stream, allowing web UI to display live task progress. Task state includes execution history, last run timestamp, and error tracking.
Combines task CRUD operations with real-time SSE logging in a single FastAPI application, eliminating the need for separate logging infrastructure. Task configuration is stored in version-controlled JSON (config.json), allowing tasks to be tracked in Git while remaining dynamically updatable via API.
Simpler than Celery/RQ for task management (no separate broker/worker); real-time logging via SSE is more efficient than polling; JSON persistence is more portable than database-dependent solutions.
scheduled task execution with cron-based timing and real-time triggering
Medium confidenceExecutes monitoring tasks on two schedules: (1) cron-based recurring execution (e.g., '0 9 * * *' for daily 9 AM checks) parsed and managed in spider_v2.py, and (2) real-time on-demand execution triggered via API or manual intervention. The system maintains a task queue, respects concurrent execution limits, and logs execution timestamps. Cron scheduling is implemented using APScheduler or similar, with task state persisted across restarts.
Integrates cron scheduling directly into the monitoring loop (spider_v2.py) rather than using external schedulers like cron or systemd timers, enabling dynamic task management via API without restarting the service. Supports both recurring (cron) and on-demand execution from the same task definition.
More flexible than system cron (tasks can be updated via API); simpler than distributed schedulers like Celery Beat (no separate broker); supports both scheduled and on-demand execution in one system.
web-based dashboard for task configuration and result browsing
Medium confidenceProvides a FastAPI-served web UI (HTML/CSS/JavaScript frontend) for managing tasks, viewing results, and monitoring system status. The dashboard includes task creation/editing forms, real-time log streaming, result filtering/search, and system health indicators. The UI communicates with the FastAPI backend via REST API calls, with authentication enforced via HTTP Basic Auth. Results can be filtered by task, date range, match score, and price range.
Embeds the web UI directly in the FastAPI application (no separate frontend server), reducing deployment complexity. Uses Server-Sent Events (SSE) for real-time log streaming, providing live task progress without polling or WebSocket overhead.
Simpler than separate frontend/backend architecture (single deployment unit); real-time logging via SSE is more efficient than polling; built-in authentication eliminates need for separate auth service.
centralized configuration management with environment variables and json files
Medium confidenceManages system configuration through src/config.py, loading settings from .env file (environment variables) and config.json (task definitions). Environment variables include API keys (OpenAI, Gemini), service URLs (ntfy, WeChat, Telegram), and feature flags. config.json stores task definitions with keywords, price filters, cron schedules, and prompt references. The system validates configuration on startup and provides fallback defaults for optional settings.
Combines environment variables (.env) for secrets with JSON files (config.json) for task definitions, allowing secrets to be excluded from version control while keeping task definitions in Git. Provides a unified Config class (src/config.py) that abstracts both sources, simplifying access throughout the codebase.
Simpler than external config servers (Consul, etcd); more secure than hardcoded secrets; supports both environment-based (12-factor) and file-based configuration patterns.
product data extraction and parsing with marketplace-specific selectors
Medium confidenceExtracts structured product data from Xianyu marketplace HTML using CSS selectors and XPath expressions defined in src/parsers.py. Parses product title, price, seller info, condition, images, and listing URL from dynamic JavaScript-rendered content. The system handles multiple product card layouts (grid, list views) and gracefully degrades when selectors fail. Extracted data is normalized into a standard schema (ProductData class) for downstream processing.
Implements marketplace-specific parsers (src/parsers.py) with fallback selectors for multiple product card layouts, allowing the system to handle Xianyu UI variations without complete parser rewrites. Uses Playwright's native DOM access (page.evaluate()) for JavaScript-rendered content extraction, avoiding Selenium's slower DOM interaction.
More robust than regex-based parsing (handles HTML structure changes); faster than Selenium for dynamic content (Playwright's native async); more maintainable than single monolithic parser (modular selector definitions).
image encoding and preprocessing for multimodal ai analysis
Medium confidenceConverts product images to base64-encoded format for transmission to multimodal AI APIs (GPT-4V, Gemini) through encode_image_to_base64() in src/ai_handler.py. Handles multiple image formats (JPEG, PNG, WebP), downloads images from URLs, and applies optional preprocessing (resizing, compression) to reduce payload size. The system validates image dimensions and file sizes before encoding to prevent API errors.
Implements async image downloading and encoding (src/ai_handler.py) to parallelize image preparation with other processing steps, reducing overall latency. Supports optional image resizing with configurable quality settings, allowing users to trade image fidelity for API cost reduction.
Async encoding is faster than sequential image processing; built-in resizing reduces API costs vs sending full-resolution images; transparent URL handling eliminates manual image download steps.
prompt template management with task-specific customization
Medium confidenceManages AI prompts through a two-tier system: base prompts (prompts/base_prompt.txt) containing system instructions for product analysis, and task-specific criteria files (prompts/*.txt) containing user-defined product preferences. The system combines base prompt + task criteria + product data into a final prompt sent to the AI API. Prompt templates support variable substitution (e.g., {product_title}, {price_range}) for dynamic content injection.
Separates base prompts (system-level instructions) from task-specific criteria files, allowing non-technical users to customize AI behavior by editing simple text files without understanding the full prompt structure. Supports variable substitution for dynamic content injection, enabling prompts to reference product-specific data.
More flexible than hardcoded prompts; simpler than full prompt engineering frameworks (no Python code required); version-controllable in Git for audit trails.
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with ai-goofish-monitor, ranked by overlap. Discovered automatically through the match graph.
cashclaw
An autonomous agent that takes work, does work, gets paid, and gets better at it.
Cline (Claude Dev)
Autonomous AI coding agent with file and terminal control.
Blackbox AI
Software That Builds Software
UI-TARS-desktop
The Open-Source Multimodal AI Agent Stack: Connecting Cutting-Edge AI Models and Agent Infra
Warp
AI-powered terminal with natural language commands.
waoowaoo
首家工业级全流程 AI 影视生产平台。Industry-first professional AI Agent platform for controllable film & video production. From shorts to live-action with Hollywood-standard workflows.
Best For
- ✓Teams building marketplace monitoring agents for Chinese e-commerce platforms
- ✓Developers needing concurrent web scraping with stateful browser sessions
- ✓Non-technical users wanting to monitor Xianyu without manual checking
- ✓Users with complex, subjective product preferences (e.g., 'vintage condition but not damaged')
- ✓Teams building intelligent marketplace agents with multimodal understanding
- ✓Developers needing flexible AI-driven filtering without hardcoded business logic
- ✓Teams deploying to cloud platforms (AWS, GCP, Azure) with Docker support
- ✓Developers wanting reproducible local development environments
Known Limitations
- ⚠Playwright browser instances consume 100-200MB RAM each; concurrent task count limited by available memory
- ⚠Anti-bot detection may require periodic cookie refresh and session rotation
- ⚠Xianyu API changes require parser updates in src/parsers.py; no built-in schema versioning
- ⚠Task scheduling relies on system cron; no distributed task queue for multi-machine deployments
- ⚠API latency adds 2-5 seconds per product analysis; batch processing limited by rate limits (3-5 req/sec for OpenAI)
- ⚠Image encoding to base64 adds ~100-300ms per product; no caching of encoded images across runs
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
Repository Details
Last commit: Apr 20, 2026
About
基于 Playwright 和AI实现的闲鱼多任务实时/定时监控与智能分析系统,配备了功能完善的后台管理UI。帮助用户从闲鱼海量商品中,找到心仪产品。
Categories
Alternatives to ai-goofish-monitor
Are you the builder of ai-goofish-monitor?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →