feat: add tiktok creator-videos command#1335
Merged
jackwener merged 3 commits intojackwener:mainfrom May 5, 2026
Merged
Conversation
TikTok Studio creator content list with views/likes/comments/saves/shares. Hits the Studio item_list endpoint (https://www.tiktok.com/tiktok/creator/manage/item_list/v1/?aid=1988) from a logged-in /tiktokstudio/content session and pages with cursor until limit is satisfied (server caps size at 50). Username for the resulting video URL is extracted from the user_text= query param on play_addr / download_info entries, falling back to scraping a[href*="/video/<id>"] from the Studio page DOM. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- Regenerate cli-manifest.json (CI gate: must match `npm run build` output) - Replace `Math.max(1, Number(args.limit) || 20)` and `Math.min(Math.max(limit, 1), 50)` with an explicit positive-integer guard + a server-cap-only ternary, per the silent-clamp guidance in references/typed-errors.md (typed-error-lint baseline is unchanged) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
f0c0c5e to
96a8bfa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
tiktok/creator-videos— TikTok Studio creator content list with per-video views / likes / comments / saves / shares.Why this is non-trivial
Existing
tiktok/userscrapes the public profile page, which only exposes a view count text node. Creators need their own engagement metrics (likes/comments/saves/shares), and those only come from the authenticated Studio API, not the public timeline.Endpoint
POST https://www.tiktok.com/tiktok/creator/manage/item_list/v1/?aid=1988Notes from verification (logged-in @dictogo session):
/tiktok/creator/manage/...rather than the public/api/...host segment used byuser/explore/search. Adapter navigates to/tiktokstudio/contentfirst so the SPA bootstraps the studio-scoped cookies beforefetch().aid=1988is required. Missing it returns HTTP 200 with an error envelope, not a clean 4xx.sizeat 50. Adapter pages withcursoruntilhas_more=falseorlimitis satisfied.user_text=query parameter onplay_addr[]/download_info.download_urls[]. Falls back to scrapinga[href*="/video/<id>"]from the Studio DOM.post_time(preferred) /create_time/schedule_time, formatted toAsia/Shanghaizh-CN.Output columns
title, date, views, likes, comments, saves, shares, urlTest plan
opencli browser verify tiktok/creator-videos✓ matches fixture (~/.opencli/sites/tiktok/verify/creator-videos.json)opencli browser verify tiktok/creator-videos --strict-memory✓ endpoints.json + notes.md present--limit 3 -f json): all 8 columns populated, video URLs matchhttps://www.tiktok.com/@<user>/video/<id>shape, view counts match Studio dashboard🤖 Generated with Claude Code