Files
ewoooc/services
ogt 6435bed005
Some checks failed
CD Pipeline / deploy (push) Failing after 1m2s
feat: implement missing PChome high-level comparison functions
Previously pchome_crawler.py only had low-level crawling primitives.
All high-level functions used by openclaw_bot_routes.py were missing,
causing _PCHOME_AVAILABLE = False on startup and '簡報生成失敗' errors.

Implemented:
  search_pchome(keyword, limit)        — simplified search → list of dicts
  find_best_match(keyword, momo_price) — best PChome match for a product
  compare_product(name, price, icode)  — single momo vs PChome comparison
  batch_compare_top(db, top_n, date)   — batch compare TOP-N momo hottest
  save_matches(db, results)            — persist results to pchome_matches
  ensure_tables(db)                    — idempotent table creation
  fmt_compare_msg(results, keyword)    — Telegram Markdown single-item msg
  fmt_daily_report(results, date_str)  — Telegram Markdown daily report msg

After this commit _PCHOME_AVAILABLE will be True and competitor PPT
generation will no longer throw RuntimeError.
2026-04-20 06:09:33 +08:00
..