Use TikHub's Douyin Web interface to extract basic work information based on a share link.
Script Directory
Important: All scripts are located in the scripts/ subdirectory of this skill.
Agent Execution Instructions:
- Determine this SKILL.md file's directory path as
SKILL_DIR - Script path =
${SKILL_DIR}/scripts/main.ts - Replace all
${SKILL_DIR}in this document with the actual path
Usage
# 输出结构化 JSON(推荐)
npx -y bun ${SKILL_DIR}/scripts/main.ts \
--share-url "https://v.douyin.com/xxxxxx/" \
--json
# 同时保存原始响应
npx -y bun ${SKILL_DIR}/scripts/main.ts \
--share-url "https://v.douyin.com/xxxxxx/" \
--json \
--raw out/raw.json
Options
--share-url <url>,--url <url>: Douyin share link (required)--raw <path>: Save the TikHub raw response JSON to a file--json: JSON output (enabled by default, compatible with existing habits)-h,--help: Show help
Env
TIKHUB_API_KEY(required)TIKHUB_BASE_URL(optional, defaulthttps://api.tikhub.io)
Request headers used:Authorization: Bearer $TIKHUB_API_KEY
Fixed Extraction Rules
- Cover:
data.aweme_detail.video.origin_cover.url_list[0] - Audio:
data.aweme_detail.music.play_url.url_list[0] - Video: iterate through
data.aweme_detail.video.bit_rate[*].play_addr.url_list[0]in array order, take the first available URL
Output
Output fields:
share_urlaweme_iddescauthor(uid、sec_uid、unique_id、nickname)cover_url(take the first according to the rule)audio_url(take the first according to the rule)video_url(take the first according to the rule)video_url_first_available(the first available link encountered in array order)video_quality_selected(the matched quality label)video_bit_rate_countapi(code、message、request_id)