byted-link-reader
Original:🇨🇳 Chinese
Translated
1 scriptsChecked / no sensitive code detected
Use the built-in link_reader function to read content from web pages, PDFs, or Douyin videos. Prepare a list of URLs. Run the script `python scripts/link_reader.py "url1" "url2" ...`.
8installs
Added on
NPX Install
npx skill4agent add bytedance/agentkit-samples byted-link-readerTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →BytedLinkReader
Application Scenarios
Use this skill to call the function when you need to obtain the title and body content of web pages, PDFs, or Douyin videos.
link_readerAuthentication and Credential Sources
- When a user uses this skill for the first time, first check if the and
ARK_API_KEYenvironment variables are configured. If not configured, prompt the user to provideMODEL_AGENT_API_KEY, and write it to the environment variable file under the workspace. If the file already exists, append it to the end, ensure the environment variable format is correct, and make this environment variable take effect.ARK_API_KEY - This skill uses the environment variable by default.
ARK_API_KEY - If not configured, it will try to use the environment variable.
MODEL_AGENT_API_KEY
Usage Steps
- Prepare a list of URLs.
- Run the script . cd to the corresponding directory before running.
python scripts/link_reader.py "url1" "url2" ... - The returned result includes the title and content corresponding to each URL.
Output Format
- A list in JSON format, where each element contains the title and content corresponding to the URL.
Error Handling
- If the error 'PermissionError: ARK_API_KEY or MODEL_AGENT_API_KEY is not set in environment variables.' occurs, prompt the user to provide or
ARK_API_KEY, write them to the environment variable file under the workspace. If the file already exists, append it to the end, ensure the environment variable format is correct, make this environment variable take effect, and retry the failed read operation.MODEL_AGENT_API_KEY - When using this skill again, prioritize reading or
ARK_API_KEYfrom environment variables.MODEL_AGENT_API_KEY
Example
bash
python scripts/link_reader.py "https://example.com"