运行时依赖
安装命令
点击复制技能文档
Amazon 竞品评论深度分析 对Amazon竞品进行7维度评论深度分析,输出Chart.js交互式HTML报告+Excel数据文件。
触发条件 用户要求分析竞品评论、Review分析、评论对比 用户提供ASIN要求做用户反馈分析、痛点挖掘 用户说"专业分析评论"、"评论深度分析"、"差评分析" 关键词:评论/review/竞品分析/用户反馈/痛点/差评/好评/选品参考
用户提供ASIN + 要求按维度整理评论 输入 ASIN列表(1-5个产品) 分析维度(可选,默认7维度全覆盖) 用户标准请求格式(模板) 当用户用以下格式请求时,直接按此模板执行: 请专业分析亚马逊美国站竞品的全部评论,Asin为{ASIN1}和{ASIN2},按以下维度整理: 1、好评Top5关键词、用户满意点 2、差评Top5痛点(质量、物流、尺寸、色差、功能、包装等分类) 3、统计抱怨最多的5个问题 4、挖掘用户未被满足的需求、隐藏刚需 5、给出差异化选品改进点、避坑要点 6、客户主要使用场景(比如卧室,地下室等) 7、全文采用标准数据分析格式进行输出,词频/情感直观比例+趋势可视化+折线图展示差评率变化,给出一份带有图表和详细分析的可视化分析报告(HTML),另外再生成一份带有调研数据和分析的EXCEL文件
7个分析维度 好评Top5关键词 — 用户满意点,词频统计+情感比例 差评Top5痛点 — 按类别分类(质量/物流/尺寸/色差/功能/包装),含严重程度评级 抱怨最多的5个问题 — 跨产品汇总排序,频次+典型引用 未被满足的需求 — 隐藏刚需、用户期望但未实现的功能 差异化改进点 — 选品建议、避坑要点、创新方向 客户使用场景 — 从评论文本提取场景(卧室/地下室/办公室等) 可视化报告 — HTML图表(含差评率趋势折线图)+ Excel数据文件
工作流程 步骤 1:产品页面访问 & 评论提取 Amazon评论页面(product-reviews/{asin})需要登录,不可直接访问。 正确方法:从产品页面内提取评论 # 导航到产品页面 browser_navigate(url=f"https://www.amazon.com/dp/{asin}") 1a. 提取评论(IIFE包装必须) // browser_console — 必须用IIFE避免变量冲突 (function() { const results = []; document.querySelectorAll('[data-hook="review"]').forEach(el => { // 标题 — 在h5元素内 let title = ''; const titleEl = el.querySelector('h5[data-hook="reviewTitle"]'); if (titleEl) title = titleEl.textContent.trim(); // 正文 — reviewText容器内的文本,需清理模板文字 let body = ''; const bodyContainer = el.querySelector('[data-hook="reviewText"]'); if (bodyContainer) { body = bodyContainer.textContent .replace(/Brief content visible.?content\./g, '') .replace(/Full content visible.?content\./g, '') .replace(/Read moreRead less/g, '') .trim(); } // 评分 — 从icon-alt提取 let rating = 0; const ratingSpan = el.querySelector('[data-hook="review-star-rating"] .a-icon-alt'); if (ratingSpan) { const m = ratingSpan.textContent.match(/(\d+(\.\d+)?)/); if (m) rating = parseFloat(m[1]); } // 日期 let date = ''; const dateEl = el.querySelector('[data-hook="review-date"]'); if (dateEl) date = dateEl.textContent.trim(); // 已验证购买 const verified = !!el.querySelector('[data-hook="avp-badge"]'); // 有用投票数 let helpful = ''; const helpEl = el.querySelector('[data-hook="helpful-vote-statement"]'); if (helpEl) helpful = helpEl.textContent.trim(); results.push({rating, title, body, date, verified, helpful}); }); // 评分分布 — 从histogram链接提取 const histLinks = document.querySelectorAll('a[href="acr_dp_hist"]'); const hist = {}; histLinks.forEach(a => { const text = a.textContent; const starMatch = text.match(/(\d)\sstar/); const pctMatch = text.match(/(\d+)%/); if (starMatch && pctMatch) { hist[starMatch[1] + '_star'] = parseInt(pctMatch[1]); } }); // 总评价数 let totalReviews = ''; const totalEl = document.querySelector('#acrCustomerReviewText'); if (totalEl) totalReviews = totalEl.textContent.trim(); // 总体评分 let overallRating = ''; const ratingEl = document.querySelector('#acrPopover .a-icon-alt'); if (ratingEl) overallRating = ratingEl.textContent.trim(); return JSON.stringify({totalReviews, overallRating, hist, count: results.length, reviews: results}); })() 1b. 提取产品信息 (function() { let title = document.querySelector('#productTitle')?.textContent.trim() || ''; let price = document.querySelector('.a-price .a-offscreen')?.textContent.trim() || ''; let features = ''; const featEl = document.querySelector('#featurebullets_feature_div'); if (featEl) features = featEl.textContent.trim().substring(0, 500); return JSON.stringify({title, price, features}); })() 1c. 评分分布备用提取 histogram链接是提取评分分布的最可靠方法。页面HTML结构: 5 star4 star3 star2 star1 star 76%12%3%4%5%76% 解析:每个链接文本包含所有百分比,最后一个%是该星级的比例。 步骤 1.5:补充更多评论(可选) 产品页面通常只显示8-11条评论。如需更多数据,通过web_search获取第三方评论摘要: # 搜索第三方评论汇总 web_search(f"amazon {asin} reviews summary analysis") web_search(f"site:reddit.com amazon {product_name} review") 步骤 2:数据存储 将提取的评论保存为JSON: import os, json os.makedirs('/tmp/amazon_reviews', exist_ok=True) with open('/tmp/amazon_reviews/review_data.json', 'w') as f: json.dump(all_data, f, indent=2, ensure_ascii=False) 步骤 3:NLP分析 3a. 关键词提取(好评+差评分离) import re from collections import Counter stop_words = set(['the', 'a', 'an', 'and', 'or', 'but', 'in', 'on', 'at', 'to', 'for', 'of', 'with', 'by', 'from', 'is', 'was', 'are', 'were', 'be', 'been', 'being', 'have', 'has', 'had', 'do', 'does', 'did', 'will', 'would', 'could', 'should', 'may', 'might', 'can', 'this', 'that', 'these', 'those', 'i', 'you', 'he', 'she', 'it', 'we', 'they', 'what', 'which', 'who', 'when', 'where', 'why', 'how', 'all', 'each', 'every', 'both', 'few', 'more', 'most', 'other', 'some', 'such', 'no', 'not', 'only', 'own', 'same', 'so', 'than', 'too', 'very', 'just', 'about', 'above', 'after', 'again', 'also', 'am', 'any', 'as', 'because', 'before', 'between', 'into', 'like', 'me', 'my', 'nor', 'off'