인터페이스는 현지화되어 있으며, Skill 소개와 설명 문서는 선택한 언어로 AI가 자동 번역합니다. 코드·명령어·경로·전문 용어는 원문을 유지하며 원작자 문서가 우선합니다.
Skills 둘러보기
개발 및 엔지니어링 · SKILL.md

web-extract

web-extract

Extract clean text content from any URL. Uses trafilatura for high-quality extraction, no API key needed.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill 문서

GitHub

name: web-extract description: "Extract clean text content from any URL. Uses trafilatura for high-quality extraction, no API key needed." version: 1.0.0 metadata: echo: tags: [Web, Extract, Scraping, Content, URL]

Web Extract

Extract readable text/markdown from any URL. Uses trafilatura — the best Python content extraction library (handles news, blogs, docs reliably).

Quick Usage

pip install trafilatura httpx
import trafilatura

# Fetch and extract in one step
text = trafilatura.fetch_and_extract("https://example.com/article")
print(text)

# With more options
downloaded = trafilatura.fetch_url("https://example.com/article")
result = trafilatura.extract(downloaded, output_format="markdown", include_links=True)

Helper script

python3 scripts/extract_url.py "https://example.com/article"
python3 scripts/extract_url.py "https://example.com" --format markdown --links

Options

ParameterEffect
output_format="markdown"Markdown with headers
include_links=TruePreserve hyperlinks
include_images=TrueInclude image references
include_tables=TruePreserve table structure
favor_recall=TrueExtract more (less precision)

Fallback: httpx + readability

For pages where trafilatura struggles:

import httpx
from readability import Document

resp = httpx.get(url, follow_redirects=True, timeout=15)
doc = Document(resp.text)
title = doc.title()
content = doc.summary()  # HTML, needs html2text for markdown

JavaScript-heavy sites

For SPAs or JS-rendered content, use playwright (optional):

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()
    page.goto(url, wait_until="networkidle")
    html = page.content()
    browser.close()
# Then pass html to trafilatura.extract()

Rate Limits

Be respectful: add 1-2 second delays between requests to the same domain. Set a User-Agent: trafilatura.fetch_url(url, config=config) with custom config.

저장한 Skills