About byted-link-reader
byted-link-reader is a skill for retrieving titles and body content from web pages, PDFs, and Douyin videos. It processes a list of URLs with a script and returns the results as a JSON list.
Key features
- 01Read web pages, PDFs, and Douyin videos
- 02Process multiple URLs
- 03Return titles and body content
- 04Output results as a JSON list
Use cases
- 01Extract titles and article text from web pages
- 02Retrieve content from PDF documents
- 03Get titles and content from Douyin videos
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ bytedance/ agentkit-samples --skill byted-link-readerAfter installing, type/byted-link-readerin Claude Code to confirm it loaded.
Bundled filesLICENSE.txtscripts/link_reader.py
Details
From the project READMEBytedLinkReader
适用场景
当需要获取网页、PDF 或抖音视频的标题和正文内容时,使用该技能调用 link_reader 函数。
认证与凭据来源
- 用户首次使用本技能时,先检查是否配置了
ARK_API_KEY和MODEL_AGENT_API_KEY环境变量,如未配置,提示用户需要提供ARK_API_KEY,并把它写入到workspace下的环境变量文件中,如果文件已存在则追加到末尾,确保环境变量格式正确,使这个环境变量生效 - 该技能默认使用
ARK_API_KEY环境变量 - 若未配置,将尝试使用
MODEL_AGENT_API_KEY环境变量。
使用步骤
- 准备 URL 列表。
- 运行脚本
python scripts/link_reader.py "url1" "url2" ...。运行之前cd到对应的目录。 - 返回结果包含每个 URL 的标题和内容。
输出格式
- JSON 格式的列表,每个元素包含 URL 对应的标题和内容。
错误处理
- 如果出现'PermissionError: ARK_API_KEY or MODEL_AGENT_API_KEY is not set in environment variables.'错误,则提示用户需要提供
ARK_API_KEY或MODEL_AGENT_API_KEY,并把它们写入到workspace下的环境变量文件中,如果文件已存在则追加到末尾,确保环境变量格式正确,使这个环境变量生效,并重试刚才失败的读取。 - 再次使用本技能时,优先从环境变量中读取
ARK_API_KEY或MODEL_AGENT_API_KEY
示例
python scripts/link_reader.py "https://example.com"
Comments
Markdown supported