executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
douyin-downloaderDownload Douyin (TikTok) videos from share links. Parse Douyin share text and links, download watermark-free videos, and transcribe audio to text using Volcano Engine ASR (Doubao Speech). Uses Python for iSH compatibility.
Independent GitHub snapshot · Automated classification · Original documentation governs
Parse Douyin share links and download videos without watermarks.
Note: The original version used Node.js. Because of iSH environment limitations, it has been converted to Python.
pip3 install requests)VOLC_APP_KEY - Volcano Engine App KeyVOLC_ACCESS_KEY - Volcano Engine Access KeyWhen the user provides Douyin share text or a link, extract the video metadata:
python3 scripts/parse_douyin.py "<share text or link>"
Input examples:
7.43 FuL:/ You know what? It really is pretty nice. https://v.douyin.com/iFDbjn2M/ Copy this link...https://v.douyin.com/iFDbjn2M/Output (JSON):
{
"video_id": "7445842287652441376",
"title": "You_know_what_It_really_is_pretty_nice",
"download_url": "https://...play.../video/...",
"raw_url": "https://...playwm.../video/...",
"share_url": "https://v.douyin.com/iFDbjn2M/",
"redirected_url": "https://www.iesdouyin.com/share/video/7445842287652441376",
"iesdouyin_url": "https://www.iesdouyin.com/share/video/7445842287652441376"
}
Key fields:
download_url - Watermark-free version (playwm to play)title - Sanitized video description, safe for filenamesvideo_id - Unique video identifierUse the download_url from step 1:
python3 scripts/download_video.py "<download_url>" "<output_path>"
Example:
python3 scripts/download_video.py "https://aweme.snssdk.com/aweme/v1/play/?video_id=..." "./downloads/You_know_what_It_really_is_pretty_nice.mp4"
Output:
{
"status": "success",
"path": "./downloads/You_know_what_It_really_is_pretty_nice.mp4"
}
Progress is written to stderr during download.
Transcribe audio or video to text using Volcano Engine ASR (Doubao Speech):
python3 scripts/transcribe_audio.py "<audio_or_video_file>" --app-key "$VOLC_APP_KEY" --access-key "$VOLC_ACCESS_KEY"
Parameters:
--app-key - Volcano Engine App Key (required, or set the VOLC_APP_KEY environment variable)--access-key - Volcano Engine Access Key (required, or set the VOLC_ACCESS_KEY environment variable)--resource-id - Resource ID: volc.bigasr.auc_turbo (flash) or volc.seedasr.auc (standard)--mode - Mode: auto | flash | standard (default: auto)--out - Output JSON file path (optional)--text-out - Output text file path (optional)Example:
# Using env vars
export VOLC_APP_KEY="your_app_key"
export VOLC_ACCESS_KEY="your_access_key"
python3 scripts/transcribe_audio.py "./downloads/video.mp4" --mode flash
# Or inline
python3 scripts/transcribe_audio.py "./downloads/video.mp4" \
--app-key "your_app_key" \
--access-key "your_access_key" \
--resource-id "volc.bigasr.auc_turbo" \
--mode flash \
--text-out "./downloads/transcript.txt"
Output (JSON):
{
"status": "success",
"mode": "flash",
"result_text": "When you feel that fate has been unfair to you, you might want to listen to what Tong Guowei said to Long Keduo...",
"result": { ... }
}
Getting API credentials:
# Step 1: Parse
result=$(python3 scripts/parse_douyin.py "7.43 FuL:/ You know what? It really is pretty nice. https://v.douyin.com/iFDbjn2M/")
# Step 2: Extract fields
download_url=$(echo "$result" | python3 -c "import sys,json; print(json.load(sys.stdin)['download_url'])")
title=$(echo "$result" | python3 -c "import sys,json; print(json.load(sys.stdin)['title'])")
# Step 3: Download
python3 scripts/download_video.py "$download_url" "./downloads/${title}.mp4"
playwm URLs to play URLs\/:*?"<>|)/video/ and /note/ URLsminis:// preview links.High_Definition_Lens_41_years_old_Qi_Xi_How_is_her_condition_The_Role_of_Film_Beijing_Premiere.mp4qixi_short.mp4Common errors:
No valid share link found - Invalid or missing URL in inputFailed to access the share link - Network error or blocked requestFailed to parse video information from HTML - Page structure changed (script needs an update)Download timed out - Network timeout (try again)When errors occur, scripts return JSON with { "status": "error", "error": "<message>" } on stderr and exit with code 1.