hzuaifa25/universal-web-api
๐ค Convert popular AI websites into standard APIs for free, enabling local deployment and complete data privacy without complex setup.
What's novel
๐ค Convert popular AI websites into standard APIs for free, enabling local deployment and complete data privacy without complex setup.
Code Analysis
9 files read ยท 4 roundsA FastAPI server that exposes an OpenAI-compatible /v1/chat/completions endpoint by driving a real Chromium browser (via DrissionPage) to type messages into web-based AI chat interfaces (ChatGPT, DeepSeek, Grok, etc.), scrape the streaming DOM response, and re-package it as SSE chunks.
Strengths
The request lifecycle management (FIFO queue, global lock, client-disconnect detection, graceful cancellation via thread-safe flags) is well-designed and production-minded. The per-site workflow configuration with optional steps, fallback selectors, and tunable streaming thresholds shows practical engineering for a hard problem (reliably scraping streaming DOM content).
Weaknesses
Zero automated tests exist โ the only 'test' is a manual __main__ block in data_models.py. The README heavily oversells the project as 'AI-powered' and 'self-healing' when it's really a browser automation proxy with a one-time AI-assisted selector extraction step; the core loop is pure DOM polling with no intelligence. The 64kb browser_core.py is a monolith that mixes constants, logging, SSE formatting, element finding, and workflow execution in one file.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
32
Contributors
2
Files
17
Active weeks
5
Repository
Language
Python
Stars
1
Forks
0
License
AGPL-3.0