Files
jackwener__opencli/docs/adapters/browser/hupu.md
kevin.zhang 8bd36aaa37 fix(hupu): add mentions command (#757)
* feat(hupu): add hupu cli adapter

* fix(hupu): prevent detail from returning the wrong thread

* refactor: deduplicate shared utilities in hupu adapter

- Merge postHupuJson and postHupuReplyJson into single function with mode parameter
- Move stripHtml and decodeHtmlEntities to utils.ts, remove duplicate definitions

* fix(hupu): add mentions command

* fix: move mentions.ts to clis/hupu/, remove src/clis/hupu duplicates

Post PR #782 restructure: adapter files live at root clis/, not src/clis/.

---------

Co-authored-by: jackwener <jakevingoo@gmail.com>
2026-04-05 03:26:40 +08:00

1.8 KiB

Hupu (虎扑)

Mode: 🌐 Public / 🔐 Browser · Domain: bbs.hupu.com

Commands

Command Description
opencli hupu hot Read Hupu hot threads
opencli hupu search <keyword> Search Hupu threads by keyword
opencli hupu detail <tid> Read one thread and optional hot replies
opencli hupu mentions Read replies that mentioned you
opencli hupu reply <tid> <text> Reply to a thread or quote one reply
opencli hupu like <tid> <pid> Like one reply
opencli hupu unlike <tid> <pid> Cancel like on one reply

Usage Examples

# Hot threads
opencli hupu hot --limit 5

# Search threads
opencli hupu search 湖人 --limit 10

# Read one thread and include hot replies
opencli hupu detail 638234927 --replies true

# Read mentions that replied to you
opencli hupu mentions --limit 20

# Reply to the thread
opencli hupu reply 638234927 "hello from opencli" --topic_id 502

# Quote one hot reply by pid
opencli hupu reply 638234927 "replying to this comment" --topic_id 502 --quote_id 174908

# Like / unlike one reply
opencli hupu like 638234927 174908 --fid 4860
opencli hupu unlike 638234927 174908 --fid 4860

# JSON output
opencli hupu detail 638234927 -f json

Notes

  • reply --topic_id maps to Hupu's API topicId, for example 502 for Basketball News
  • reply --quote_id is the quoted reply pid
  • mentions reads my.hupu.com notification APIs from the logged-in browser session
  • like / unlike --fid uses the forum ID from thread metadata
  • detail --replies true appends top hot replies to the content field

Prerequisites

  • Chrome running and able to open bbs.hupu.com and my.hupu.com
  • Browser Bridge extension installed
  • For mentions, reply, like, and unlike, a valid Hupu login session in Chrome is required