Ingest: a crawl source for sites without a sitemap
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
F-06 task 12. ingest() finds pages from a sitemap, a list of URLs, or a local folder (IngestSource in packages/ingest/src/types.ts:5-9). Plenty of small sites have no sitemap. For those, the cloud's onboarding (and chatcops ingest) needs to crawl from the homepage instead.
sources: [{ type: 'crawl', url: 'https://example.com', maxDepth: 3, maxPages: 200 }]
What to do
- Add
{ type: 'crawl'; url: string; maxDepth?: number; maxPages?: number }toIngestSource, with defaults of 3 levels and 500 pages. - Handle it in
discover()(packages/ingest/src/discover.ts:25). Starting fromurl, fetch each page, collect<a href>links, and follow those on the same origin breadth-first, up tomaxDepthlevels andmaxPagespages.- Normalize every link with the existing
normalizeUrl()and skip ones already seen. - Skip
mailto:,tel:, fragments-only links and non-HTML responses. - Respect
robots.txtthe way the other sources already do (robots.ts), and applyinclude/excludebefore fetching.
- Normalize every link with the existing
- Reuse the fetched HTML so a crawled page isn't downloaded twice when it's extracted. The fetch and extract steps are in
ingest.ts. - The concurrency cap (
concurrency) andtimeoutMsapply to crawl fetches too. - Add
--crawl <url>tochatcops ingestinpackages/cli/src/main.ts, or acceptcrawl:sources in the config, whichever fits the existing--sourcehandling better.
Acceptance criteria
- Tests with a local fixture site served by a test HTTP server (
packages/ingest/testsalready has one for sitemaps): follows same-origin links, stops atmaxDepthandmaxPages, ignores other origins,mailto:and fragments, honoursrobots.txtandexclude, and fetches each page once - The source in the ingest options table in
website/src/content/docs/core/knowledge-base.mdx(pnpm docs:checkpasses) - A minor changeset for
@chatcops/ingest(and@chatcops/cliif the CLI changes);pnpm test:coverage(85/80),pnpm lintandpnpm api(commit the snapshot) pass
Comment here to be assigned.
- 主要语言
- TypeScript
- 星标
- 13
- 派生
- 7
- 平均合并
- 3 小时 11 分钟
- 30 天内合并 PR
- 330
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codercops/chatcops 的其他 Issue
-
fix(core): Cohere and Voyage rerankers bypass non-positive limit check on NaN topN and send invalid null payload可能已有人在做 @bhushan4work 于 2 天前认领。 未关闭bug
codercops/chatcops#582 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Widget: a code block tagged `c++`, `c#` or `objective-c` shows part of the tag as code可能已有人在做 @prakashNalla 于 2 天前认领。 未关闭bug widget
codercops/chatcops#578 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Docs: Astro, Nuxt and SvelteKit guides for the server可能已有人在做 @anurag2787 于 3 天前认领。 未关闭documentation
codercops/chatcops#575 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Server: chatcopsNext(), one catch-all route for Next.js可能已有人在做 @Saifjafri212213 于 3 天前认领。 未关闭enhancement server
codercops/chatcops#574 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
@chatcops/react: a <ChatCops> component and useChatCops() hook可能已有人在做 @Saifjafri212213 于 3 天前认领。 未关闭enhancement widget
codercops/chatcops#573 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 codercops/chatcops 的全部 Issue
相似的 Issue
-
[fullsend] E2E: scorecard — filecheck GitLab entity metrics unavailable due to initialDelay timing未关闭e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 75/100
redhat-developer/rhdh-plugin-export-overlays#4698 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
devswha/herdr-web-ui#2884 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
b:minor bug
难度 2/5 1-3 小时 新手友好度 78/100
software-mansion/argent#1771 ·
维护者通常 1 天内回复
-
Resources: New palettes of Xiamen可能已有人在做 @rmt-svc 今天认领。 未关闭resources
难度 1/5 1-3 小时 新手友好度 74/100
railmapgen/rmg-palette#2491 ·
维护者通常 4 天内回复