headed-fetcher

ボット対策で保護されたページをPlaywrightのheadedブラウザで取得します。WebFetchが403エラーを返す場合や、Cloudflareチャレンジが表示される場合に使用してください。

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "headed-fetcher" with this command: npx skills add drillan/headed-fetcher/drillan-headed-fetcher-headed-fetcher

headed-fetcher

WebページをPlaywrightで取得し、Markdown形式に変換するClaude Codeスキル。

When to Use

  • WebFetchツールが403エラーを返す場合
  • Cloudflareなどのボット対策が表示される場合
  • JavaScriptを実行しないとコンテンツが表示されないサイト

Setup

./scripts/setup.sh

Usage

# 基本的な使用方法
uv run scripts/fetch.py https://example.com

# ファイルに出力
uv run scripts/fetch.py https://example.com -o output.md

# 特定要素のみを抽出
uv run scripts/fetch.py https://example.com --selector "article"

# ボット対策サイト用(headedモード)
uv run scripts/fetch.py https://protected-site.com --headed

Claude Code Integration

スキルがインストールされたディレクトリから実行する場合は、cdではなくuv run --directoryオプションを使用してください:

# 推奨: --directory オプションを使用
uv run --directory $SKILL_DIR scripts/fetch.py <URL> [options]

# 例(スキルが ~/.claude/skills/headed-fetcher にインストールされている場合)
uv run --directory ~/.claude/skills/headed-fetcher scripts/fetch.py https://example.com --headed

重要: cd $SKILL_DIR && uv run ... の形式は使用しないでください。

Options

OptionDescription
-o FILEファイルに出力
--selector CSSCSSセレクタで要素を抽出
--headedheadedモードで実行
--timeout Nタイムアウト秒数(デフォルト: 30)
--wait-until待機条件(load/domcontentloaded/networkidle)
--no-block-images画像読み込みを有効化
--no-block-fontsフォント読み込みを有効化
--no-block-mediaメディア読み込みを有効化

Output Format

---
url: https://example.com
title: Page Title
fetched_at: 2026-01-24T12:34:56Z
---

# Page Heading

Content in Markdown...

Exit Codes

CodeMeaning
0Success
1Network error (timeout, DNS, connection)
2Selector not found
3Markdown conversion error

Detailed Documentation

See references/REFERENCE.md for advanced usage and troubleshooting.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

progress-report

No summary provided by upstream source.

Repository SourceNeeds Review
General

planning-validate

No summary provided by upstream source.

Repository SourceNeeds Review
General

docs-sync

No summary provided by upstream source.

Repository SourceNeeds Review
General

implementation-verify

No summary provided by upstream source.

Repository SourceNeeds Review