海外访问:www.kdjingpai.com
Ctrl + D 收藏本站
当前位置:首页 » AI答疑

SiteMCP有哪些提高抓取效率的参数选项?

2025-08-25 1.4 K

SiteMCP提供了多个实用参数来优化抓取过程:

  • 并发控制--concurrency参数(如--concurrency 10)可提高同时抓取的页面数
  • 路径匹配-m/--match参数支持通配符匹配特定URL路径(如-m "/blog/**"只抓取博客部分)
  • 内容选择器--content-selector通过CSS选择器精准抓取特定区域(如--content-selector ".content"
  • 缓存管理--cache-dir自定义缓存路径,--no-cache禁用缓存

这些参数可以组合使用,例如:
npx sitemcp https://example.com --concurrency 5 -m "/docs/**" --content-selector "#main"
这条命令会:

  1. 以5个并发抓取文档部分
  2. 只提取#main元素内的内容
  3. 使用默认缓存设置

相关推荐

找不到AI工具?在这试试!

输入关键词,即可 无障碍访问 必应 搜索,快速找到本站所有 AI 工具。

回顶部


Fatal error: Uncaught wfWAFStorageFileException: Unable to save temporary file for atomic writing. in /www/wwwroot/www.kdjingpai.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:34 Stack trace: #0 /www/wwwroot/www.kdjingpai.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php(658): wfWAFStorageFile::atomicFilePutContents() #1 [internal function]: wfWAFStorageFile->saveConfig() #2 {main} thrown in /www/wwwroot/www.kdjingpai.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php on line 34