Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/api/02-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ OpenViking supports various resource types, categorized by functionality:

| Type | Resource Name | Description |
|------|---------------|-------------|
| Single page / recursive crawl | `https://host/path` | By default only the entry page is fetched. Set `args.depth > 0` to crawl same-host links breadth-first; `args.max_pages` only bounds how many pages are collected. Each page is extracted to Markdown with trafilatura, with an automatic Playwright fallback for SPAs whose static HTML carries no body text. Supported `args`: `depth`, `max_pages`, `include_paths`, `exclude_paths`, `allow_external_links`, `skip_download_links`. Download links discovered on pages are skipped by default (`skip_download_links=true`) to avoid importing sidecar files such as `llms.txt`; set it to `false` to download same-host file links and count them toward `max_pages`. `include_paths`/`exclude_paths` use **path-prefix** matching (e.g. `/docs/` matches only paths starting with `/docs/`, never substrings like `/blog/docs-tips`). |
| Single page / recursive crawl | `https://host/path` | By default only the entry page is fetched. Set `args.depth > 0` to crawl same-host links breadth-first; `args.max_pages` only bounds how many pages are collected. Each page is extracted to Markdown with trafilatura. Supported `args`: `depth`, `max_pages`, `include_paths`, `exclude_paths`, `allow_external_links`, `skip_download_links`. Download links discovered on pages are skipped by default (`skip_download_links=true`) to avoid importing sidecar files such as `llms.txt`; set it to `false` to download same-host file links and count them toward `max_pages`. `include_paths`/`exclude_paths` use **path-prefix** matching (e.g. `/docs/` matches only paths starting with `/docs/`, never substrings like `/blog/docs-tips`). |

> Routing: sitemap-looking URLs (`https://host/sitemap.xml`, `https://host/feed.xml`, `*.atom`, ...) and explicit `args.site=true` are delegated to the whole-website ingestion below; Git hosting URLs such as `https://github.com/{org}/{repo}` are delegated to the Code section above.

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/api/02-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ OpenViking 支持多种资源类型,按照功能分类如下:
网页类(递归网页爬虫)
| 类型 | 资源名 | 说明 |
|------|--------|------|
| 单页 / 递归抓取 | `https://host/path` | 默认仅抓入口页;设置 `args.depth > 0` 后,沿同域链接 BFS 递归展开,`args.max_pages` 只限制最多收集的页面数。每页用 trafilatura 抽成 Markdown,对 SPA 等静态 HTML 拿不到正文的站点自动降级到 Playwright 渲染。可选 `args`:`depth`、`max_pages`、`include_paths`、`exclude_paths`、`allow_external_links`、`skip_download_links`。页面中发现的下载链接默认跳过(`skip_download_links=true`),避免导入 `llms.txt` 等 sidecar 文件造成重复;设为 `false` 时会下载同域文件链接,并计入 `max_pages`。`include_paths`/`exclude_paths` 按**路径前缀**匹配(例如 `/docs/` 仅匹配以 `/docs/` 开头的路径,不会误命中 `/blog/docs-tips`)。|
| 单页 / 递归抓取 | `https://host/path` | 默认仅抓入口页;设置 `args.depth > 0` 后,沿同域链接 BFS 递归展开,`args.max_pages` 只限制最多收集的页面数。每页用 trafilatura 抽成 Markdown。可选 `args`:`depth`、`max_pages`、`include_paths`、`exclude_paths`、`allow_external_links`、`skip_download_links`。页面中发现的下载链接默认跳过(`skip_download_links=true`),避免导入 `llms.txt` 等 sidecar 文件造成重复;设为 `false` 时会下载同域文件链接,并计入 `max_pages`。`include_paths`/`exclude_paths` 按**路径前缀**匹配(例如 `/docs/` 仅匹配以 `/docs/` 开头的路径,不会误命中 `/blog/docs-tips`)。|

> 路由说明:`https://host/sitemap.xml`、`https://host/feed.xml`、`*.atom` 等 sitemap-looking URL 和显式 `args.site=true` 让出给下表的整站导入;`https://github.com/{org}/{repo}` 等 Git 托管平台 URL 让出给上文的代码导入。

Expand Down
4 changes: 0 additions & 4 deletions openviking/parse/accessors/web_crawler/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class CrawlConfig:
retry_times: int = 2
max_links_per_page: int = 500
max_html_bytes: int = 10 * 1024 * 1024
fallback_playwright: bool = True
playwright_timeout: float = 30.0
request_validator: Optional[Callable[[str], None]] = None

def __post_init__(self) -> None:
Expand All @@ -43,5 +41,3 @@ def __post_init__(self) -> None:
raise ValueError("max_links_per_page must be >= 1.")
if self.max_html_bytes < 1:
raise ValueError("max_html_bytes must be >= 1.")
if self.playwright_timeout <= 0:
raise ValueError("playwright_timeout must be > 0 for recursive web crawling.")
1 change: 0 additions & 1 deletion openviking/parse/accessors/web_crawler/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ class CrawlResult:
total_downloads: int = 0
total_skipped: int = 0
total_failed: int = 0
fallback_rendered: int = 0
191 changes: 0 additions & 191 deletions openviking/parse/accessors/web_crawler/playwright_renderer.py

This file was deleted.

83 changes: 0 additions & 83 deletions openviking/parse/accessors/web_crawler/render_heuristics.py

This file was deleted.

Loading