Перейти к навигации

Why does another Bilibili comments action use pn?

bilibili.web.fetch_video_comments uses the 1-based integer page number pn because the Web comments action paginates by page index, whereas the Bilibili App comments action paginates with next_offset.

Requesting the next page with pn

When continuing from page 1 of a Web comment export, keep the same bv_id and send pn:2 to POST /v1/social-data/call:

{"action":"bilibili.web.fetch_video_comments","params":{"bv_id":"<confirmed_bv_id>","pn":2}}

Start every new Web comment collection at pn:1 and advance by integer page numbers while keeping bv_id unchanged.

Web pn pagination vs App next_offset pagination

  • Web comments (bilibili.web.fetch_video_comments): Paginates with integer pn starting at 1 and takes bv_id.
  • App comments: Paginates with next_offset instead of pn.
  • Switching actions: Do not continue a Web pn run inside the App action. Start a separate collection following next_offset pagination.

Logging and deduplicating across pages

  1. Record each response: Store the action name, bv_id, pn page number, and request ID alongside every raw response.
  2. Deduplicate by comment: Live thread updates can shift comments across page boundaries so a comment appears on two adjacent pages. Keep one copy per comment in your merged output while retaining both original responses.