A collection of example templates and modules for the exray web scraping and data extraction platform, including fetchers, extractors, and handlers for various web scraping patterns
This is a template/example repository for the exray web scraping framework, not a functional MCP server. Tools are documented as TypeScript template files with Chinese descriptions, but lack proper MCP tool registration, JSON Schema input definitions, and structured output schemas. No tool definitions are explicitly registered via MCP protocol. Descriptions exist but are domain-specific (web scraping patterns) rather than LLM-optimized. Input parameters are mentioned in prose but not formalized as JSON Schema with types. Output structures are implied but not documented. This appears to be educational/reference material, not a production MCP implementation.
形态:**用只读 kv 做渲染缓存**。handler 拿到的三条 binding 是只读的。缓存由 fetcher 写、handler 读
形态:**详情页 → 单个对象**。从详情页快照中提取 title、description、canonical、image、published_at、word_count 等字段
形态:**fetcher 里用 DOM,extractor 只整形**。负责清洗与类型转换(价格转数字、去空行、统一字段名)。从 fetcher 打的结构化行中提取产品列表
extractor 骨架 —— 把 `PageSnapshot` 变成结构化 JSON。沙箱里没有 DOM,也不能 import 任何运行时模块
fetcher 骨架 —— 驱动浏览器到目标状态,返回 `PageSnapshot`。它不负责解析,解析交给 extractor
接公网 HTTP 请求,返回页面。能做:读本 project 的 job 数据(`ctx.data`)· 返回 HTML/JSON · 按路径自路由。不能做:写任何东西(三条 binding 都是只读)· 访问网络 · 读别的 project
形态:**分页 / 无限滚动** —— 反复滚到底触发懒加载,直到不再增长。用在瀑布流、"加载更多"式的列表
形态:**把某个 definition 的最新产物当 API 发出去**。用在定时 crawl,想让别的系统直接 GET 到最新结果。它是公开的,无鉴权
No JSON Schema input definitions visible. Tools document parameters in prose (e.g., 'url: string') but lack formal JSON Schema with type, description, and constraint declarations.
No output schemas documented. Tools return TypeScript types (e.g., 'PageSnapshot', '{ items, count }') but do not declare structured JSON output schemas. LLMs cannot plan downstream calls without knowing response field names and types.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 24 | 2026-07-28+ | v2 |
形态:**列表页 → 条目数组**。从一页多条的 HTML 里拆出每条的字段(title 和 href)
形态:**列表页** —— 打开一个列表,等内容渲染完再取快照。用在商品列表、文章列表、搜索结果这类「一页多条」的页面
形态:**登录后 session** —— 先登录,再在同一个浏览器会话里取目标页。一次 fetcher 调用内的多次 `ctx.page.*` 共享同一个浏览器会话,cookie 会带过去
形态:**分页链** —— 返回下一页 URL,驱动 crawl 自动往下抓。配合 `crawl` 的 `follow: "result:next"`
形态:**结果看板** —— 把最近的抓取结果渲染成一个人能打开的页面。`/` 给人看 HTML,`/api` 给机器看 JSON,一个 handler 服务整站
Tool definitions are not explicitly registered via MCP protocol. Source shows TypeScript template files with 'satisfies HandlerModule' / 'satisfies ExtractorModule', but no MCP tool registration (no tools array, no MCP server initialization). Tools are inferred from file names and comments, not formally declared.
Descriptions are domain-specific (web scraping patterns) rather than LLM-optimized. E.g., 'handler' describes 'HTTP request handling' in Chinese; 'detail-page' explains 'extract title, description, canonical, image' but does not state WHEN to use it vs other extractors or WHAT the LLM should do next.
No error handling guidance. Tools do not document failure modes, recovery steps, or actionable error messages. E.g., 'login-session' does not explain what happens if login fails or how to retry.