简介
整合大众点评与小红书双平台数据,通过智能匹配与一致性算法,为餐饮推荐提供可信度评分与验证,解决单一平台评价失真问题。
原始描述
Cross-reference restaurant recommendations from Xiaohongshu (小红书) and Dianping (大众点评) to validate restaurant quality and consistency. Use when querying restaurant recommendations by geographic location (city/district) to get validated insights from both platforms. Automatically fetches ratings, review counts, and analyzes consistency across platforms to provide trustworthy recommendations with confidence scores.
安装
下载 zip 解压后,把里面的文件放进你的 Agent 的 skills 目录即可使用。
给 Agent 的直链(让它自己下载安装):
https://v110.com/skill/skill-26013.zip
Claude Code 放 ~/.claude/skills/;Codex、TypingMind 等按各自文档的 skills 目录放置。技能申请什么权限由作者决定,装前请确认。
中文使用说明 来自收录源
核心用法
Restaurant Review Crosscheck 是一款针对中国本地生活场景的餐厅推荐验证工具,通过同时抓取大众点评和小红书两平台的公开数据,运用多维度一致性算法为用户筛选出真实可靠的餐厅。
典型使用场景:
- 旅行前查询目的地高口碑餐厅
- 避开"刷单店"和"照骗餐厅"
- 快速了解某区域某菜系的真实消费反馈
- 对比不同平台的评价差异
操作流程:用户输入地理位置(如"上海静安区")和菜系类型(如"日式料理"),工具自动完成:①双平台数据抓取 → ②餐厅名称模糊匹配 → ③评分/热度/情感一致性计算 → ④生成带置信度分数的推荐列表。
显著优点
1. 数据来源互补性强 大众点评提供结构化评分(1-5星)和海量评价基数,小红书补充UGC种草内容的热度指标(点赞/收藏)和情感语义,两者交叉验证大幅降低单一平台数据偏差。
2. 智能一致性评分机制 采用加权公式综合"评分相关性(50%) + engagement验证(30%) + 情感对齐度(20%)",输出0-10分的推荐置信度,直观区分"高口碑共识店"与"平台差异大、需警惕店铺"。
3. 本土化匹配能力 内置中文餐厅名称模糊匹配(Levenshtein距离),可识别连锁分店、地域别名等变体,解决"银座寿司"vs"银座寿司静安店"的匹配难题。
4. 输出格式清晰实用 结果包含:推荐指数、双平台原始数据、一致性评级、热词标签对比、潜在风险提示,适合快速决策。
潜在缺点与局限性
1. 技术依赖性与合规风险 该工具无官方API授权,依赖网页爬虫获取数据。大众点评和小红书均有反爬机制,实际使用需配置代理、Cookie轮换,存在账号封禁和法律合规风险(平台服务条款通常禁止自动化抓取)。
2. 数据时效性问题 爬虫抓取非实时API,存在数据延迟;高峰期请求失败率高,需指数退避重试,用户体验不稳定。
3. 当前实现为模拟数据
据安全报告披露,v1.0.0版本实际返回的是_fetch_mock_data()模拟数据,而非真实抓取结果。用户若期望真实数据,需自行配置登录态和反爬环境,技术门槛较高。
4. 地域与语言限制 仅支持中文餐厅名称和地址解析,依赖中国本地平台,海外餐厅或英文场景无法使用。
5. 隐私与会话安全 需持久化存储用户登录Cookie至本地JSON文件,存在会话劫持或意外泄露风险;Playwright浏览器自动化下载Chromium(约170MB),增加攻击面。
适合人群
- 技术能力较强的个人用户:能配置代理、处理Cookie过期、理解爬虫限制
- 旅行规划者/美食爱好者:愿意花时间验证推荐,不追求即开即用
- 数据分析师/研究人员:需中国本地餐饮舆情数据用于学术研究
- 不适合:追求一键便捷的主流用户、对隐私敏感的商业场景、无技术背景的普通消费者
常规风险
| 风险类型 | 具体表现 | 缓解建议 |
|---|---|---|
| 账号封禁 | 高频请求触发平台风控 | 严格设置1次/2-3秒限速,使用住宅代理轮换 |
| 法律合规 | 违反平台ToS导致民事追责 | 仅限个人研究用途,避免商业化数据 resale |
| 数据失真 | 爬虫解析失败返回过期/错误数据 | 交叉验证时关注"一致性评级",低一致性结果需人工复核 |
| 隐私泄露 | 本地Cookie文件被恶意读取 | 设置文件权限600,定期清理session_state.json |
| 供应链攻击 | Playwright/依赖包被植入恶意代码 | 使用pip audit扫描,锁定依赖版本 |
技术评估小结
该Skill功能设计精巧,填补了"跨平台口碑验证"的细分需求,但当前成熟度为Demo级别(安全评级B/65分,T3来源)。生产环境使用需:① 获取平台官方API授权(如大众点评开放平台);② 或自建合规的数据缓存层;③ 并完善会话加密与审计日志。建议技术用户作为研究参考工具,而非完全依赖的决策系统。
技能正文
name: restaurant-review-crosscheck description: Cross-reference restaurant recommendations from Xiaohongshu (小红书) and Dianping (大众点评) to validate restaurant quality and consistency. Use when querying restaurant recommendations by geographic location (city/district) to get validated insights from both platforms. Automatically fetches ratings, review counts, and analyzes consistency across platforms to provide trustworthy recommendations with confidence scores.
Restaurant Review Cross-Check
Cross-reference restaurant data from Xiaohongshu and Dianping to provide validated recommendations.
Quick Start
Query restaurants by location and cuisine type:
# Basic query
crosscheck-restaurants "上海静安区" "日式料理"
# With filters
crosscheck-restaurants "北京朝阳区" "火锅" --min-rating 4.5 --min-reviews 100
Workflow
1. Data Collection
Query both platforms simultaneously:
Dianping:
- Fetch restaurants matching location + cuisine
- Extract: name, rating, review_count, price_range, address, tags
Xiaohongshu:
- Search notes/posts matching location + cuisine
- Extract: restaurant_name, engagement_metrics (likes/saves), sentiment_score
- Note: Xiaohongshu data requires scraping as no public API
2. Data Matching
Match restaurants across platforms using fuzzy matching:
- Restaurant name similarity (Levenshtein distance)
- Location proximity (address matching)
- Handle name variations (e.g., "银座寿司" vs "银座寿司静安店")
See scripts/match_restaurants.py for matching logic.
3. Consistency Analysis
Calculate consistency score based on:
- Rating correlation (0-1): Correlation between platform ratings
- Engagement validation (0-1): Do high ratings correlate with high engagement?
- Sentiment alignment (0-1): Do user sentiments align across platforms?
Formula: consistency_score = (rating_corr * 0.5) + (engagement_val * 0.3) + (sentiment_align * 0.2)
4. Recommendation Score
Calculate final recommendation score:
recommendation_score = (
(dianping_rating * 0.4) +
(xhs_engagement_normalized * 0.3) +
(consistency_score * 0.3)
) * 10
Output: 0-10 scale, where >8.0 = high confidence recommendation
Output Format
📍 [Location] [Cuisine Type] 餐厅推荐
1. [Restaurant Name]
🏆 推荐指数: X.X/10
⭐ 大众点评: X.X (Xk评价)
💬 小红书: X.X⭐ (X笔记)
📍 地址: [Address]
💰 人均: ¥[Price]
✅ 一致性: [高/中/低] - [Brief explanation]
📊 平台对比:
- 大众点评标签: [Tags]
- 小红书热词: [Keywords]
⚠️ 注意: [Any discrepancies or warnings]
[Continue for top 5-10 restaurants...]
Thresholds
- Min rating: 4.0/5.0 (configurable)
- Min reviews: 50 on Dianping, 20 notes on Xiaohongshu (configurable)
- Max results: Top 10 restaurants by recommendation score
- High consistency: Score > 0.7
- Medium consistency: Score 0.5-0.7
- Low consistency: Score < 0.5 (flag for manual review)
API & Data Sources
Dianping
- Method: Web scraping (Dianping API requires business partnership)
- Base URL: https://www.dianping.com
- Rate limiting: 1 request/2 seconds minimum
- Anti-scraping: Use residential proxies, rotate user agents
See scripts/fetch_dianping.py for implementation.
Xiaohongshu
- Method: Web scraping (no public API)
- Base URL: https://www.xiaohongshu.com
- Rate limiting: 1 request/3 seconds minimum
- Authentication: Cookies required for full access
See scripts/fetch_xiaohongshu.py for implementation.
Configuration
Edit scripts/config.py to set:
DEFAULT_THRESHOLDS = {
"min_rating": 4.0,
"min_dianping_reviews": 50,
"min_xhs_notes": 20,
"max_results": 10
}
PROXY_CONFIG = {
"use_proxy": True,
"proxy_list": ["http://proxy1:port", "http://proxy2:port"]
}
Error Handling
- No matches found: Suggest broader search terms or nearby areas
- Platform timeout: Retry with exponential backoff, max 3 attempts
- Rate limiting detected: Pause for 60 seconds, rotate proxy
- Low confidence results: Flag results with consistency < 0.5 for manual review
Advanced Features
Sentiment Analysis
Xiaohongshu posts use NLP to extract:
- Food quality mentions
- Service quality mentions
- Atmosphere mentions
- Price/value mentions
See references/sentiment_analysis.md for methodology.
Fuzzy Matching
Handle restaurant name variations:
- Chain stores (e.g., "海底捞火锅" vs "海底捞静安店")
- Abbreviations (e.g., "鼎泰丰" vs "鼎泰丰上海店")
- Translation differences
Uses thefuzz library for similarity scoring.
Dependencies
pip install requests beautifulsoup4 pandas numpy thefuzz selenium lxml
See scripts/requirements.txt for complete list.
Troubleshooting
Issue: Xiaohongshu returns empty results
- Solution: Check if cookies expired, re-authenticate
Issue: Dianping blocks requests
- Solution: Reduce request rate, rotate proxies
Issue: Poor matching between platforms
- Solution: Adjust similarity threshold in
match_restaurants.py
References
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。