Skip to content

feat: add tiktok creator-videos command#1335

Merged
jackwener merged 3 commits intojackwener:mainfrom
myluke:feat/tiktok-creator-videos
May 5, 2026
Merged

feat: add tiktok creator-videos command#1335
jackwener merged 3 commits intojackwener:mainfrom
myluke:feat/tiktok-creator-videos

Conversation

@myluke
Copy link
Copy Markdown
Contributor

@myluke myluke commented May 5, 2026

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/user scrapes 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=1988

Notes from verification (logged-in @dictogo session):

  • Studio domain segment. Lives under /tiktok/creator/manage/... rather than the public /api/... host segment used by user / explore / search. Adapter navigates to /tiktokstudio/content first so the SPA bootstraps the studio-scoped cookies before fetch().
  • aid=1988 is required. Missing it returns HTTP 200 with an error envelope, not a clean 4xx.
  • Pagination caps size at 50. Adapter pages with cursor until has_more=false or limit is satisfied.
  • Username is not in the item payload. Extracted from the user_text= query parameter on play_addr[] / download_info.download_urls[]. Falls back to scraping a[href*="/video/<id>"] from the Studio DOM.
  • Date fields are Unix seconds. post_time (preferred) / create_time / schedule_time, formatted to Asia/Shanghai zh-CN.

Output columns

title, date, views, likes, comments, saves, shares, url

Test 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
  • Real-account spot check on @dictogo (--limit 3 -f json): all 8 columns populated, video URLs match https://www.tiktok.com/@<user>/video/<id> shape, view counts match Studio dashboard
  • Reviewer with a different Studio account to sanity-check pagination beyond 50 rows

🤖 Generated with Claude Code

root and others added 3 commits May 6, 2026 00:53
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) <noreply@anthropic.com>
- 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) <noreply@anthropic.com>
@jackwener jackwener force-pushed the feat/tiktok-creator-videos branch from f0c0c5e to 96a8bfa Compare May 5, 2026 16:54
@jackwener jackwener merged commit 1794933 into jackwener:main May 5, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants