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:
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 integerpnstarting at1and takesbv_id. - App comments: Paginates with
next_offsetinstead ofpn. - Switching actions: Do not continue a Web
pnrun inside the App action. Start a separate collection followingnext_offsetpagination.
Logging and deduplicating across pages
- Record each response: Store the action name,
bv_id,pnpage number, and request ID alongside every raw response. - 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.

