Browser plugin data collection for Douyin/TikTok/Xiaohongshu via a local bridge, including one-shot closed-loop runs (collect → poll → export → return table...
Use this skill when the user wants to collect platform data with the browser extension bridge, especially for:
Prefer the bundled script below instead of hand-writing curl flows.
Resolve {baseDir} as the parent directory of this SKILL.md.
Use the bundled script:
{baseDir}/scripts/collect_and_export_loop.sh
It handles the full loop:
/api/collectTASK_RUNNING when possiblecompleted or errorexport.status=completed and return export.tableUrlWhen the user gives explicit parameters, pass them directly.
Example:
{baseDir}/scripts/collect_and_export_loop.sh \
--platform douyin \
--method videoKeyword \
--keyword "美食探店" \
--max-items 3 \
--feature video \
--mode search \
--interval 300 \
--fetch-detail true \
--detail-speed fast \
--auto-export true \
--export-mode personal \
--ensure-bridge \
--bridge-cmd 'node /Users/zhym/coding/web_pluging/web_collection/bridge/bridge-server.js' \
--force-stop-before-start
Notes:
--keyword is repeatable for multiple keywords.--link for link-based methods.--ensure-bridge, always include it.For the common Douyin video keyword flow, you can use:
{baseDir}/scripts/run.sh --keyword "小龙虾AI助手" --max-items 10 --ensure-bridge --bridge-cmd 'node /Users/zhym/coding/web_pluging/web_collection/bridge/bridge-server.js'
This wrapper defaults to:
platform=douyinmethod=videoKeywordfeature=videomode=searchinterval=300fetchDetail=truedetailSpeed=fastautoExport=trueexportMode=personalforce-stop-before-start=trueWhen the user asks for a strict output shape, do not add commentary.
Typical final fields:
taskIdstatusexport.status or exportStatusexport.tableUrl or tableUrlIf the task fails, return the same shape with empty strings where needed rather than adding a long explanation, unless the user asked for diagnosis.
--ensure-bridge --bridge-cmd 'node .../bridge-server.js'.pluginConnected=false, the bridge may be up but the browser extension is not connected.--force-stop-before-start.curl unless debugging.ZIP package — ready to use