Skip to content
cccskills
FreePublished on GitHub

js-page-fetch

JavaScript の描画が要るページの取り方を決める。WebFetch や ctx_fetch_and_index が空のシェルや 内容の無い骨組みだけを返したとき、またはサイトが headless の user agent を 403 で弾いたときに使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3 stars(GitHub 3 + cccskills 0)
Works withPlaywright

Run score Not tested

See how to install

Files included (1)

  • SKILL.md2.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

JS 描画ページの取得

素の HTTP fetch で内容が取れないページは playwright-cli で取得する。 コマンドの使い方は同梱スキル playwright-cli にある。ここには、そのスキルが答えない この環境固有の判断だけを書く。

いつ使うか

  • WebFetch や ctx_fetch_and_index が空のシェルや骨組みだけを返した。
  • 目的の内容がアコーディオンやタブの内側にあり、初期 DOM に存在しない。
  • サイトが headless の user agent を 403 で弾いた。

同梱スキルは browser automation とテスト作成を前提に書かれているため、この用途では 起動しない。上記に当てはまるときは「情報が公開されていない」と結論づける前に試す。

この環境での決めごと

ブラウザ

macOS では --browser chrome --headed を使う。--headed を付けないと UA に HeadlessChrome が残り、 headless を弾くサイトで 403 になる。

Linux には Chrome がなく、ディスプレイもないため --headed は使えない。 --browser を指定せず chromium をヘッドレスで使うが、headless を弾くサイトは 同じ理由で 403 になりうる。回避策は未検証。そのようなサイトに当たったら --config でのカスタム UA 上書きなど別の手段を調査する。

プロファイル

--persistent、--profile、attach --cdp=chrome は使わない。既定の一時プロファイル だけを使い、ユーザーの Chrome プロファイルには触れない。ログインが必要なページは このスキルの対象外とする。

取り出し方

DOM を掻き集める前に requests と response-body でページが叩いている JSON エンドポイントを探す。表形式のデータは、レンダリング結果より元の JSON のほうが 速く確実に取れる。

出力が大きいときは設定ファイルで outputMode を file にしてファイルに落とす。

locale で表示が変わる SPA は browser.contextOptions.locale を指定する。 accept-language ヘッダだけでは切り替わらないことがある。

本文抽出ツールは記事本文だけを残すため、料金表のような UI コンポーネントを落とす。ページ全体の構造や レイアウトが要るときは本文抽出を使わず、snapshot でページ構造を、requests でエンドポイントを取る。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

シェルコマンドの実行、ファイル読み込み、URL の取得、検索、データの解析や変換を行うときに、 経路を通常のツールと context-mode の ctx_ ツールのどちらにするか判断するために使う。 context-mode が接続されている場合に適用する。ctx stats や ctx doctor といった "ctx" コマンドにも使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

描く内容に合った図の種類を選んで図を書く。Mermaid の図、AWS の構成図、 マインドマップ (markmap。Mermaid ではない) を書く、直す、読み直すときに使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

文書を書く、置き場所を決める、配置をレビューするときに使う。Markdown の書式、 ADR の作法、文書の層ごとの役割と正本の原則を扱う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

gh-ops

Free

GitHub の Issue の作成、Issue へのコメント、draft PR の作成、PR へのレビューコメントの追加に使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

PR のレビューコメントを解決する、または対応するときに使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

コミットを頼まれたとき、plan のタスクを 1 つ終えたとき、まとまったコードの変更を 1 つ終えたときに、 次の作業に移る前に使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

See all skills by iimuz

Report a problem with this skill