🎯

headed-fetcher

🎯Skill

from drillan/headed-fetcher

VibeIndex|
What it does

headed-fetcher skill from drillan/headed-fetcher

headed-fetcher

Installation

Quick InstallInstall with npx
npx skills add drillan/headed-fetcher
git cloneClone repository
git clone https://github.com/drillan/headed-fetcher.git
uv runRun with uv
uv run playwright install chromium
uv runRun with uv
uv run scripts/fetch.py https://example.com
uv runRun with uv
uv run scripts/fetch.py https://example.com -o output.md

+ 3 more commands

📖 Extracted from docs: drillan/headed-fetcher
5
-
Last UpdatedJan 24, 2026

Skill Details

SKILL.md

Overview

# headed-fetcher

![Python 3.13+](https://img.shields.io/badge/Python-3.13%2B-blue)

![License: MIT](https://img.shields.io/badge/License-MIT-green)

![Playwright](https://img.shields.io/badge/Playwright-1.57.0-orange)

ボット対策で保護されたWebページをPlaywrightのheadedブラウザで取得し、Markdown形式に変換するClaude Codeスキルです。

機能(Features)

  • Playwrightブラウザ - ヘッドレス/headedモードでWebページを取得
  • Markdown変換 - HTMLをMarkdownに変換(YAMLフロントマター付き)
  • CSSセレクタ抽出 - 特定の要素のみを抽出
  • リソースブロック - 画像・フォント・メディアをブロックして高速化

前提条件(Requirements)

  • Python 3.13以上
  • [uv](https://docs.astral.sh/uv/)(Pythonパッケージマネージャー)

インストール(Installation)

skills.shからインストール(推奨)

```bash

npx skills add drillan/headed-fetcher

```

手動インストール

```bash

# リポジトリをクローン

git clone https://github.com/drillan/headed-fetcher.git

cd headed-fetcher

# セットアップスクリプト実行(冪等)

./scripts/setup.sh

```

または、個別にセットアップする場合:

```bash

cd headed-fetcher

# 依存関係インストール

uv sync

# Playwrightブラウザインストール

uv run playwright install chromium

```

使い方(Usage)

基本的な使用方法

```bash

# URLを取得してMarkdownに変換(標準出力)

uv run scripts/fetch.py https://example.com

```

ファイルに出力

```bash

uv run scripts/fetch.py https://example.com -o output.md

```

特定要素のみを抽出

```bash

# 記事本文のみを取得

uv run scripts/fetch.py https://example.com --selector "article"

```

ボット対策サイト用(headedモード)

```bash

uv run scripts/fetch.py https://protected-site.com --headed

```

オプション一覧(Options)

| オプション | 説明 |

|-----------|------|

| -o FILE | ファイルに出力 |

| --selector CSS | CSSセレクタで要素を抽出 |

| --headed | headedモードで実行(ボット対策回避) |

| --timeout N | タイムアウト秒数(デフォルト: 30) |

| --wait-until | 待機条件(load/domcontentloaded/networkidle) |

| --no-block-images | 画像読み込みを有効化 |

| --no-block-fonts | フォント読み込みを有効化 |

| --no-block-media | メディア読み込みを有効化 |

出力フォーマット(Output Format)

YAMLフロントマター付きのMarkdown形式で出力されます:

```yaml

---

url: https://example.com

title: Page Title

fetched_at: 2026-01-24T12:34:56Z

---

# Page Heading

Content in Markdown...

```

終了コード(Exit Codes)

| コード | 意味 |

|-------|------|

| 0 | 成功 |

| 1 | ネットワークエラー(タイムアウト、DNS、接続) |

| 2 | セレクタが見つからない |

| 3 | Markdown変換エラー |

Claude Code統合(Claude Code Integration)

いつ使うべきか

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

`uv run --directory`の使い方

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

```bash

# 推奨: --directory オプションを使用

uv run --directory $SKILL_DIR scripts/fetch.py [options]

# 例(スキルが ~/.claude/skills/headed-fetcher にインストールされている場合)

uv run --directory ~/.claude/skills/headed-fetcher scripts/fetch.py https://example.com --headed

```

詳細ドキュメント

より詳細な情報(アーキテクチャ、エラー対処、パフォーマンスチューニング等)については、[references/REFERENCE.md](references/REFERENCE.md) を参照してください。

ライセンス(License)

MIT License