自动采集 Shopify 网店分类链接,从导航结构提取真实分类层级,一级分类和二级分类分别放在不同单元格,输出标准 CSV 文件。
这个技能特别适合:
# 采集分类(默认输出到 C:\workspace\caiji)
node collect.js <网站URL>
# 指定输出目录
node collect.js <网站URL> C:\输出目录
# 查看帮助
node collect.js
| 列名 | 说明 |
|---|---|
| ------ | ------ |
| 完整链接 | 分类页面的完整 URL |
| URL 路径 slug | URL 中的路径部分 |
| 一级分类 | 提取的第一级分类名称 |
| 二级分类 | 提取的第二级分类名称 |
| 实际层级深度 | 实际有多少级分类 |
对于链接 https://lulumonclick-eu.shop/collections/women-women-clothes-tank-tops:
| 字段 | 值 |
|---|---|
| ------ | ----- |
| 完整链接 | https://lulumonclick-eu.shop/collections/women-women-clothes-tank-tops |
| URL 路径 slug | women/women-clothes-tank-tops |
| 一级分类 | Women |
| 二级分类 | Women Clothes Tank Tops |
| 实际层级深度 | 2 |
对于 https://shop.futvortexstore.com/collections/liverpool:
| 字段 | 值 |
|---|---|
| ------ | ----- |
| 完整链接 | https://shop.futvortexstore.com/collections/liverpool |
| URL 路径 slug | premier-league/liverpool |
| 一级分类 | Premier League |
| 二级分类 | Liverpool |
| 实际层级深度 | 2 |
完全符合你的要求! 👍
npm install
# 如果你已经安装了 playwright,不需要重复安装
依赖:
在 https://shop.futvortexstore.com/ 测试:
Premier League 一级 → Liverpool 二级 ✅Created by OpenClaw 根据需求自动生成
共 1 个版本