Skip to content

HelloRuru/google-map-voices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

google-map-voices

從 Google Maps 抓評論、自動分類分析,產出可以直接用的客人金句

Python SeleniumBase License Claude Skill

中文 | English


這個工具在幹嘛

抓 Google Maps 店家評論 → 自動分類 → 產出可以直接拿去寫文案/做品牌健診的情報。

適合誰用

  • 社群代操、行銷顧問 → 接客戶前先了解風評
  • Blog/SEO 寫手 → 抓 EEAT 真實顧客見證
  • 店家老闆 → 看自己店或對手店的真實口碑
  • Claude Code 使用者 → 裝成 Skill 自動觸發

不適合幹嘛

  • 商業批量爬蟲(請走 Google Maps API 付費方案)
  • 評論回覆自動化(這只是抓取分析,不寫回覆)

三步驟上手

1. 安裝

git clone https://github.com/HelloRuru/google-map-voices.git
cd google-map-voices
pip install -r requirements.txt

第一次跑會自動下載 ChromeDriver(約 30 秒),這是正常的。

2. 抓評論

python scraper.py "寶可夢中心台北" --sort all --max 60 -o reviews.json

跑完會看到:

==================================================
 抓取摘要:寶可夢中心台北
==================================================
  總計:66 則(58 則含文字)
  星等分布:
    5 星 │ ████████████             34 (51.5%)
    4 星 │ ███                       8 (12.1%)
    3 星 │ █                         3 ( 4.5%)
    2 星 │                           1 ( 1.5%)
    1 星 │ ███████                  20 (30.3%)
  樣本平均:3.53 星
==================================================

3. 分析

reviews.json 丟進 Claude / GPT,要它「按 references/analysis-guide.md 的格式分析」就會得到:

  • 正面金句(六大分類)
  • EEAT 顧客見證格式(馬賽克姓名 + 日期)
  • 負面三種歸類(真痛點 / 反轉金句 / 無效抱怨)
  • 一句話關鍵洞察

詳細分析指南:references/analysis-guide.md


進階用法

用 Google Maps URL 直接抓(更準)

python scraper.py --url "https://www.google.com/maps/place/..."

只抓最低評分(負評偵察)

python scraper.py "店名" --sort lowest --max 30

顯示瀏覽器除錯

python scraper.py "店名" --show

排序模式說明

模式 說明 適用情境
newest 最新評論 看最近的客人怎麼說
relevant 最相關(Google 預設) 一般偵察
highest 最高評分 找正面金句
lowest 最低評分 找痛點
all 四種合併去重(推薦 樣本最大化

裝成 Claude Code Skill

把整個資料夾複製到 ~/.claude/skills/google-map-voices/,Claude 看到「抓評論」「開評論」等觸發詞就會自動使用。

git clone https://github.com/HelloRuru/google-map-voices.git \
  ~/.claude/skills/google-map-voices

限制

  • Google Maps 單一排序最多回 20-30 則,--sort all 合併能拉到 60-80 則
  • 345 則評論的店家最多抓 50-60 則(Google 限制)
  • 抓取時間:單排序約 1 分鐘,--sort all 約 3-4 分鐘
  • 不會繞登入牆,純抓公開資料
  • Google 隨時可能改版 selector,本工具用 best-effort 維護

工作原理

店名/URL
   ↓
SeleniumBase UC (反偵測無頭瀏覽器)
   ↓
切評論分頁 → 排序 → 滾動載入 → 展開全文
   ↓
BeautifulSoup 解析 → 提取 id/name/text/stars/time
   ↓
四種排序合併去重 → JSON

關鍵技術:

  • UC mode:SeleniumBase 的 undetected-chromedriver 模式,繞過 Google 的自動化偵測
  • 隨機 UA + jitter delay:仿真人行為,降低封鎖風險
  • 多 selector fallback:店名/評分/滾動容器都有多個候選,Google 改版時不會直接掛掉
  • 四種排序合併:Google 限制單排序 20-30 則,但四種排序的內容會重疊但不完全相同,合併去重後最大化樣本

License

MIT — 詳見 LICENSE


Made with 🐰 by HelloRuru

About

Google Maps 評論抓取與分析工具 | Google Maps review scraper + analysis tool for Claude Code Skills

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages