餐厅推荐交叉验证
by @liyang2016
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.
clawhub install restaurant-crosscheck📖 About This Skill
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:
Xiaohongshu:
2. Data Matching
Match restaurants across platforms using fuzzy matching:
See scripts/match_restaurants.py for matching logic.
3. Consistency Analysis
Calculate consistency score based on:
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
API & Data Sources
Dianping
See scripts/fetch_dianping.py for implementation.
Xiaohongshu
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
Advanced Features
Sentiment Analysis
Xiaohongshu posts use NLP to extract:See references/sentiment_analysis.md for methodology.
Fuzzy Matching
Handle restaurant name variations: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
Issue: Dianping blocks requests
Issue: Poor matching between platforms
match_restaurants.pyReferences
💡 Examples
Query restaurants by location and cuisine type:
# Basic query
crosscheck-restaurants "上海静安区" "日式料理"With filters
crosscheck-restaurants "北京朝阳区" "火锅" --min-rating 4.5 --min-reviews 100
⚙️ 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"]
}
📋 Tips & Best Practices
Issue: Xiaohongshu returns empty results
Issue: Dianping blocks requests
Issue: Poor matching between platforms
match_restaurants.py