name: content-parser description: | Extract and parse content from URLs. Triggers on: user provides a URL to extract content from, another skill needs to parse source material, "parse this URL", "extract content", "解析連結", "提取內容". metadata: openclaw: emoji: "🔗" requires: env: ["LISTENHUB_API_KEY"] primaryEnv: "LISTENHUB_API_KEY"
Extract and normalize content from URLs across supported platforms. Returns structured data including content body, metadata, and references. Useful as a preprocessing step for content generation skills or standalone content extraction.
shared/authentication.md for API key and headersshared/common-patterns.md for polling, errors, and interaction patternsshared/config-pattern.md before any interaction~/Downloads/ or .listenhub/ — save to the current working directoryFollow shared/config-pattern.md § API Key Check. If the key is missing, stop immediately.
Follow shared/config-pattern.md Step 0.
If file doesn't exist — ask location, then create immediately:
mkdir -p ".listenhub/content-parser"
echo '{"autoDownload":true}' > ".listenhub/content-parser/config.json"
CONFIG_PATH=".listenhub/content-parser/config.json"
# (or $HOME/.listenhub/content-parser/config.json for global)
Then run Setup Flow below.
If file exists — read config, display summary, and confirm:
當前配置 (content-parser):
自動下載:{是 / 否}
Ask: "使用已儲存的配置?" → 確認,直接繼續 / 重新配置
autoDownload: trueautoDownload: falseSave immediately:
NEW_CONFIG=$(echo "$CONFIG" | jq --argjson dl {true/false} '. + {"autoDownload": $dl}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"
CONFIG=$(cat "$CONFIG_PATH")
Free text input. Ask the user:
What URL would you like to extract content from?
Ask if the user wants to configure extraction options:
Question: "Do you want to configure extraction options?"
Options:
- "No, use defaults" — Extract with default settings
- "Yes, configure options" — Set summarize, maxLength, or Twitter tweet count
If "Yes", ask follow-up questions: - Summarize: "Generate a summary of the content?" (Yes/No) - Max Length: "Set maximum content length?" (Free text, e.g., "5000") - Twitter count (only if URL is Twitter/X profile): "How many tweets to fetch?" (1-100, default 20)
Summarize:
Ready to extract content:
URL: {url}
Options: {summarize: true, maxLength: 5000, twitter.count: 50} / default
Proceed?
Wait for explicit confirmation before calling the API.
references/supported-platforms.md)json
{
"source": {
"type": "url",
"uri": "{url}"
},
"options": {
"summarize": true/false,
"maxLength": 5000,
"twitter": {
"count": 50
}
}
}
Omit options if user chose defaults.POST /v1/content/extract → extract taskIdrun_in_background: true and timeout: 300000. Note: status field is .data.status (not processStatus), interval is 5s, values are processing/completed/failed:bash
TASK_ID="<id-from-step-3>"
for i in $(seq 1 60); do
RESULT=$(curl -sS "https://api.marswave.ai/openapi/v1/content/extract/$TASK_ID" \
-H "Authorization: Bearer $LISTENHUB_API_KEY" 2>/dev/null)
STATUS=$(echo "$RESULT" | tr -d '\000-\037\177' | jq -r '.data.status // "processing"')
case "$STATUS" in
completed) echo "$RESULT"; exit 0 ;;
failed) echo "FAILED: $RESULT" >&2; exit 1 ;;
*) sleep 5 ;;
esac
done
echo "TIMEOUT" >&2; exit 2
6. When notified, download and present result:
If autoDownload is true:
- Write {taskId}-extracted.md to the current directory — full extracted content in markdown
- Write {taskId}-extracted.json to the current directory — full raw API response data
bash
echo "$CONTENT_MD" > "${TASK_ID}-extracted.md"
echo "$RESULT" > "${TASK_ID}-extracted.json"
Present: ``` 內容提取完成!
來源:{url} 標題:{metadata.title} 長度:~{character count} 字元 消耗積分:{credits}
已儲存到當前目錄: {taskId}-extracted.md {taskId}-extracted.json ```
/podcast, /tts)Estimated time: 10-30 seconds depending on content size and platform.
shared/api-content-extract.mdreferences/supported-platforms.mdshared/common-patterns.md § Async Pollingshared/common-patterns.md § Error Handlingshared/config-pattern.mdUser: "Parse this article: https://en.wikipedia.org/wiki/Topology"
Agent workflow:
1. URL: https://en.wikipedia.org/wiki/Topology
2. Options: defaults (omit options)
3. Submit extraction
curl -sS -X POST "https://api.marswave.ai/openapi/v1/content/extract" \
-H "Authorization: Bearer $LISTENHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": {
"type": "url",
"uri": "https://en.wikipedia.org/wiki/Topology"
}
}'
curl -sS "https://api.marswave.ai/openapi/v1/content/extract/69a7dac700cf95938f86d9bb" \
-H "Authorization: Bearer $LISTENHUB_API_KEY"
User: "Extract recent tweets from @elonmusk, get 50 tweets"
Agent workflow:
1. URL: https://x.com/elonmusk
2. Options: {"twitter": {"count": 50}}
3. Submit extraction
curl -sS -X POST "https://api.marswave.ai/openapi/v1/content/extract" \ -H "Authorization: Bearer $LISTENHUB_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "source": { "type": "url", "uri": "https://x.com/elonmusk" }, "options": { "twitter": { "count": 50 } } }'7w4.net小蔥技能站收錄全網優質技能,值得收藏。
這是一款實用的內容提取工具,能快速從網頁、影片、社交媒體等多種來源獲取所需內容,支援多個主流平臺,操作流程簡潔,每步都有確認提示,能自動生成摘要。整體質量良好,但需要配置 API 才能使用,對非技術使用者有一定門檻,且部分平臺內容可能存在限制。