执行时间: 2025-12-24 工具: Claude in Chrome MCP 数据源: Paula's Choice (成分) + iHerb (产品)
- 来源: https://www.paulaschoice.com/ingredient-dictionary/ingredient-niacinamide.html
- 评级: BEST ⭐️⭐️⭐️⭐️⭐️
- 安全评分: 9/10
- 刺激性: Low
- 功能: Brightening (美白)
- 主要功效:
- Pore minimizing (收缩毛孔)
- Brightening (提亮肤色)
- Anti-aging (抗老)
- Soothing (舒缓)
- Barrier repair (屏障修复)
- Antioxidant (抗氧化)
- Oil control (控油)
- 别名: Vitamin B3, Nicotinamide
- 使用浓度: 0.2% - 20%
- 分类: Antioxidant, Humectant
- 来源: https://www.paulaschoice.com/ingredient-dictionary/ingredient-hyaluronic-acid.html
- 评级: BEST ⭐️⭐️⭐️⭐️⭐️
- 安全评分: 10/10
- 刺激性: None
- 功能: Moisturizing (保湿)
- 主要功效:
- Hydration (深度补水)
- Moisture retention (锁水)
- Anti-aging (抗老)
- Soothing (舒缓)
- Antioxidant (抗氧化)
- Barrier protection (屏障保护)
- Plumping (丰盈)
- 别名: Hyaluronate, Sodium Hyaluronate
- 使用浓度: 0.1% - 2%
- 特点: 可吸收自身重量 1000 倍的水分
- 分类: Humectant, Antioxidant, Texture Enhancer
- 来源: https://www.iherb.com/pr/cetaphil-moisturizing-cream-fragrance-free-3-oz-85-g/113010
- 品牌: Cetaphil
- 分类: Moisturizer (面霜)
- 价格: $5.47 (原价 $6.62, 折扣 17%)
- 价格档位: Budget (亲民)
- 规格: 3 oz (85 g)
- 评分: 4.7/5 ⭐️⭐️⭐️⭐️⭐️
- 评价数: 54,826 条
- 适用肤质: Dry, Sensitive
- 针对问题: Dryness, Sensitivity
核心成分 (23个):
Water, Glycerin, Petrolatum, Dicaprylyl Ether, Dimethicone,
Glyceryl Stearate, Cetyl Alcohol, Helianthus Annuus (Sunflower) Seed Oil,
PEG-30 Stearate, Panthenol, Niacinamide, Prunus Amygdalus Dulcis (Sweet Almond) Oil,
Tocopheryl Acetate, Pantolactone, Dimethiconol, Acrylates/C10-30 Alkyl Acrylate Crosspolymer,
Carbomer, Propylene Glycol, Disodium EDTA, Benzyl Alcohol,
Phenoxyethanol, Sodium Hydroxide, Citric Acid
产品特点:
- ✅ Hydrates for 48 hours
- ✅ Fully restores skin barrier
- ✅ Contains Glycerin, Vitamin B3 (Niacinamide) & B5 (Panthenol)
- ✅ Dermatologist recommended
- ✅ Fragrance free
- ✅ Paraben free
- ✅ Won't clog pores
- ✅ Hypoallergenic
- ✅ Trusted for 75 years
✓ 数据验证通过
总成分数: 2
功能分类分布:
brightening: 1
moisturizing: 1
刺激性分布:
low: 1
none: 1
安全评级: 平均 9.5, 范围 [9, 10]
字段完整性:
name: 2/2 (100%)
aliases: 2/2 (100%)
function: 2/2 (100%)
safetyRating: 2/2 (100%)
benefits: 2/2 (100%)
warnings: 0/2 (0%) ← 正常,这两个成分都很安全
发现 0 个问题
✓ 数据验证通过
总产品数: 1
产品分类分布:
moisturizer: 1
价格档位分布:
budget: 1
成分数量: 平均 23.0
平均评分: 4.70/5.00
发现 0 个问题
// 使用 Claude in Chrome MCP 创建浏览器会话
tabs_context_mcp(createIfEmpty: true)// 成分数据
navigate("https://www.paulaschoice.com/ingredient-dictionary/ingredient-niacinamide.html")
// 产品数据
navigate("https://www.iherb.com/pr/cetaphil-moisturizing-cream-fragrance-free-3-oz-85-g/113010")// 截图查看页面
computer({ action: "screenshot" })
// 滚动查看完整内容
computer({ action: "scroll", scroll_direction: "down" })根据页面内容提取关键信息,按照预定义的 schema 构建 JSON:
- 成分 schema: name, aliases, function, safetyRating, irritationRisk, benefits, warnings
- 产品 schema: id, name, brand, category, ingredients, price, rating, reviewCount
python3 data_validation.py \
--input ingredients_scraped.json \
--output ingredients_validated.json \
--type ingredient- ✅ 100% 必需字段完整率
- ✅ 0 个验证错误
- ✅ 所有数据符合预定义的枚举值和范围
在 Cetaphil 产品中发现了我们刚抓取的成分:
- Niacinamide (烟酰胺) - 第 11 个成分
- Panthenol (维生素 B5) - 第 10 个成分
- Glycerin (甘油) - 第 2 个成分
这验证了数据抓取的实用性!
$5.47 → "budget" # 符合 < $50 的规则从完整字符串成功拆分出 23 个独立成分,每个都被正确识别和清洗。
从页面截图中提取 Niacinamide 成分信息,包括:
- Rating (评级)
- Benefits (功效)
- Categories (分类)
- At a Glance (关键点)
- Description (完整描述)
按照 JSON 格式输出:
{
"name": "标准 INCI 名称",
"aliases": ["同义词"],
"function": "功能类别",
"safetyRating": 1-10,
"irritationRisk": "none/low/medium/high",
"benefits": ["功效列表"],
"warnings": ["注意事项"] 或 null
}
从页面截图中提取产品信息:
- 产品名称和品牌
- 价格和评分
- 完整成分表 (ingredients)
- 产品特点和功效
确保成分表完整,不要截断。
| 任务 | 耗时 | 备注 |
|---|---|---|
| 抓取 Niacinamide | ~2 分钟 | 包括导航、截图、数据提取 |
| 抓取 Hyaluronic Acid | ~2 分钟 | 同上 |
| 抓取 Cetaphil 产品 | ~3 分钟 | 需要搜索和滚动查看成分 |
| 数据验证 | ~10 秒 | 自动化脚本 |
| 总计 | ~7 分钟 | 3 个数据项 |
平均效率: 2.3 分钟/项
-
截图 + 内容提取组合
- 截图提供视觉上下文
- read_page 提供可访问性树结构
- 两者结合确保信息完整
-
渐进式滚动策略
- 先截图查看整体布局
- 逐步滚动查找关键内容(如成分表)
- 避免一次滚动过多错过重要信息
-
数据验证自动化
- Python 脚本自动检查格式
- 自动映射常见错误值
- 生成详细质量报告
-
批量处理优化
- 可以并行打开多个标签页
- 使用模板化提示词
- 自动化滚动和内容定位
-
成分匹配增强
- 建立成分词典索引
- 自动关联产品成分与成分数据库
- 标记未识别成分
-
数据增强
- 添加图片 URL
- 抓取用户评价样本
- 记录价格历史趋势
所有抓取和验证的数据已保存到以下文件:
- ingredients_scraped.json - 原始抓取的成分数据
- ingredients_validated.json - 验证和清洗后的成分数据 ✅
- products_scraped.json - 原始抓取的产品数据
- products_validated.json - 验证和清洗后的产品数据 ✅
- 继续抓取 Top 100 成分(已完成 2/100)
- 抓取 50 个产品(已完成 1/50)
- 建立成分-产品关联索引
- 实现 JSON 加载机制(替换硬编码)
- 扩展 IngredientFunction 枚举(添加
.solvent) - 构建成分搜索和推荐引擎
- 定期更新数据(每月)
- 添加用户反馈循环
- 机器学习预测成分有效性
完整的数据抓取方案和指南:
- DATA_SCRAPING_PLAN.md - 完整实施方案
- CHROME_SCRAPING_GUIDE.md - 操作手册
- DATA_COLLECTION_README.md - 快速入门
- data_validation.py - 验证脚本
总结: 通过 Claude in Chrome,我们成功演示了从 Paula's Choice 和 iHerb 抓取护肤品数据的完整流程。数据质量优秀,验证通过率 100%。这为 SkinLab 项目扩充数据库提供了可行的解决方案。
🎉 演示成功!