界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

web-fetch

web-fetch

【数据与研究】Fetch and extract clean content from URLs using Jina Reader API. Use when users need to read webpage content, extract article text, or fetch URL content for analysis. Triggers on "fetch this page", "read this URL", "extract content from", "get the content of", "what does this page say".

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: web-fetch description: Fetch and extract clean content from URLs using Jina Reader API. Use when users need to read webpage content, extract article text, or fetch URL content for analysis. Triggers on "fetch this page", "read this URL", "extract content from", "get the content of", "what does this page say".

Web Fetch

Overview

Extract clean, readable content from any URL using Jina Reader API. Returns raw JSON with title, content, and metadata optimized for LLM consumption.

When to Use

  • User wants to read or analyze webpage content
  • Need to extract article text from a URL
  • Fetching documentation or reference pages
  • Converting web pages to clean text for processing

Workflow

  1. Identify the URL from user request
  2. Validate URL format
  3. Run the fetch script
  4. Present extracted content to user

Usage

# Basic fetch
uv run --script scripts/web_fetch.py --url "https://example.com"

# With custom timeout
uv run --script scripts/web_fetch.py \
  --url "https://example.com/article" \
  --timeout 60

Parameters

ParameterDefaultDescription
--url(required)URL to fetch and extract content from
--timeout30Request timeout in seconds

Output Contract

Scenariostdoutstderrexit code
SuccessRaw JSON from Jina(empty)0
Invalid URL(empty)Error message1
Timeout(empty)Timeout error1
HTTP Error(empty)HTTP error details1

Success output contains:

  • Page title and description
  • Clean extracted content (markdown-formatted)
  • URL and metadata
  • Token usage information

Prerequisites

  • Uses Jina Reader API (no API key required)
  • Requires uv for running PEP 723 scripts

Examples

Fetch a webpage

uv run --script scripts/web_fetch.py \
  --url "https://docs.python.org/3/whatsnew/3.12.html"

Fetch with longer timeout for slow pages

uv run --script scripts/web_fetch.py \
  --url "https://example.com/large-article" \
  --timeout 60
我的收藏