SuperAPI AI Directory

byted-link-reader

Writing & research

View repository

Updated 10-15 17:30

About this skill

BytedLinkReader

Use cases

When you need to retrieve the title and body content of a webpage, PDF, or Douyin video, use this skill to call the link_reader function.

Authentication and credential sources

  • When a user uses this skill for the first time, first check whetherARK_API_KEYandMODEL_AGENT_API_KEYenvironment variables are configured. If they are not configured, prompt the user to provideARK_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.
  • This skill uses the ARK_API_KEY environment variable by default
  • If it is not configured, it will try to use the MODEL_AGENT_API_KEY environment variable.

Usage steps

  1. Prepare a URL list.
  2. Run the script python scripts/link_reader.py "url1" "url2" .... Before running, cd to the corresponding directory.
  3. The returned result contains the title and content of each URL.

Output format

  • A JSON-formatted list, where each element contains the title and content corresponding to a 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 provideARK_API_KEYorMODEL_AGENT_API_KEY, and write them to the environment variable file under the workspace. If the file already exists, append them to the end, ensure the environment variable format is correct, make these environment variables take effect, and retry the read that just failed.
  • When using this skill again, prioritize readingARK_API_KEYorMODEL_AGENT_API_KEY

Example

python scripts/link_reader.py "https://example.com"