Zerox Ins Photo Downloaderのロゴ

Zerox Ins Photo Downloader

コミュニティ
ZeroxZhang
zerox-ins-photo-downloader

Instagramのプロフィールページから写真をすべてダウンロードし、投稿日時順にローカルディスクへ保存します。InstagramのプロフィールURL(instagram.com/<username>/)を共有し、そのアカウントの写真や画像のダウンロード、保存、バックアップを依頼した場合、アカウントの写真をローカルに保存したいと言った場合、またはInstagramプロフィールのメディアをスクレイピングしたいと依頼した場合に起動します。ログイン済みのChromeからのCookie抽出、ブラウザー上でのスクロールによる全投稿の収集、投稿日時順のダウンロードに対応します。Instagramと明示されていなくても、「このアカウントの写真をダウンロードして」とだけ依頼された場合に使用します。リンクがinstagram.comなら起動してください。

Add to TypingMind

概要

公開者ZeroxZhang
リポジトリzerox-skills
スキル名zerox-ins-photo-downloader
スター
40
フォーク
5
同梱ファイル
3
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    ZeroxZhangがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Zerox Ins Photo Downloader」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/ZeroxZhang/zerox-skills/tree/main/zerox-ins-photo-downloader
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ZeroxZhang/zerox-skills.git /tmp/zerox-skills
mkdir -p .claude/skills
cp -r /tmp/zerox-skills/zerox-ins-photo-downloader .claude/skills/zerox-ins-photo-downloader
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでZerox Ins Photo Downloaderを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にZerox Ins Photo Downloaderを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Zerox Ins Photo Downloaderは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Instagram Photo Downloader

Downloads every photo from an Instagram profile into a local folder, with filenames prefixed by publish time so that sorting by name equals sorting by publish time.

When to use

  • User shares an https://www.instagram.com/<username>/ link and wants the photos.
  • User wants to back up / save / download an account's images locally.
  • User wants photos ordered by publish date.

Prerequisites (host machine)

  • macOS with Google Chrome installed and the user logged into Instagram in Chrome (any profile that has visited instagram.com works; the Default profile is tried first).
  • Python 3 with pycryptodome and requests (install once: python3 -m venv .venv && .venv/bin/pip install pycryptodome requests pillow).
  • Node.js ≥ 18 with the playwright package resolvable, and a Playwright Chromium build cached (see the collect script's auto-detection; if missing, npx playwright install chromium).

Workflow

Run these three scripts in order from the skill's scripts/ directory. The scripts are self-contained: each takes explicit paths via CLI flags, so you can keep intermediate files anywhere (e.g. the user's workspace).

Step 1 — Extract the login cookies

bash
python extract_cookies.py --domain instagram.com --out cookies.json

This decrypts Chrome's cookie DB (Keychain key + PBKDF2 + AES-CBC) and writes a flat JSON map. It strips the shared 32-byte prefix that new Chrome versions add to every cookie value — do not remove that logic; without it the sessionid comes out as garbage and Instagram rejects the session.

Expect output like OK: 6 cookies extracted and a sessionid line. If it fails with "no cookies found", the user is not logged in — ask them to log in and retry. Never ask the user to paste a sessionid; extracting from Chrome is the whole point.

Step 2 — Collect all post metadata by scrolling

bash
node collect_posts.js <username> --cookies cookies.json --out posts_meta.json

The script launches headless Chromium with the extracted cookies, opens the profile page, scrolls to the bottom repeatedly, and intercepts the /graphql/query POST responses carrying xdt_api__v1__feed__user_timeline_graphql_connection. Each edge's node has everything needed: code (shortcode), taken_at (unix seconds), and image_versions2.candidates (image URLs) or carousel_media (multi-image posts). The script dedupes by shortcode and stops when has_next_page is false and the page height stops growing.

Why the browser approach is required: Instagram's lightweight API endpoints are locked down — web_profile_info returns only the post count with empty edges, feed/user returns empty items, and the old GraphQL query hashes return HTTP 400. Scrolling a real browser is the reliable path. Do not waste time trying the blocked endpoints.

The script prints a running count (e.g. captured 12 posts, has_next: true) and finishes with FINAL: collected N posts. Verify N is positive before downloading.

Optional flags: --chromium <path> to point at a specific browser binary, --max-scrolls <n> for very large accounts.

Step 3 — Download and sort by publish time

bash
python download_photos.py --meta posts_meta.json --cookies cookies.json --out instagram_photos

For each post it picks the largest image candidate, expands carousels into individual files, skips videos (media_type == 2), and names files:

20140618_214538_pYzdmAqFNU.jpg     <- single photo
20190502_032203_Bw7nVQVFZwC_2.jpg  <- 2nd image of a carousel

Because the filename begins with YYYYMMDD_HHMMSS, sorting the folder by filename sorts by publish time (verified ascending). The script reuses files that already exist, so re-running is safe.

Verification (always do this)

After Step 3 completes, verify before reporting success:

  1. Count check — expected images = posts without carousels + sum of carousel children (videos excluded). Compare to files downloaded. If the profile said 72 posts and you have 82 jpgs with 6 carousels, that's right.
  2. File validity — confirm every file is a real image:
    bash
    file instagram_photos/*.jpg | grep -cv "JPEG image data"   # expect 0
  3. Ordering — confirm timestamps are non-decreasing when sorted by name.
  4. Spot check — open the first, middle, and last image to make sure they aren't placeholders or error pages.

Troubleshooting

  • "no cookies found" — user isn't logged into Instagram in Chrome.
  • FINAL collected 0 posts — session expired or Instagram served a challenge/login wall; re-extract cookies (Step 1) and retry. If the account is private, only followers can see posts.
  • Playwright can't find a browser — the script auto-detects ~/Library/Caches/ms-playwright/chromium-*; if none, run npx playwright install chromium.
  • Some downloads fail (FAIL lines) — CDN links can 404 if stale; re-run the download script; existing files are skipped, only missing ones retry.
  • macOS permission prompts — the Keychain read may pop a dialog the first time; the user should click "Allow".

Security note

The extracted cookies.json contains the user's login session. It is sensitive — tell the user they may delete it after the download finishes. Never share it, and don't write it into chat output.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Zerox Ins Photo Downloader」では何ができますか?

Instagramのプロフィールページから写真をすべてダウンロードし、投稿日時順にローカルディスクへ保存します。InstagramのプロフィールURL(instagram.com/<username>/)を共有し、そのアカウントの写真や画像のダウンロード、保存、バックアップを依頼した場合、アカウントの写真をローカルに保存したいと言った場合、またはInstagramプロフィールのメディアをスクレイピングしたいと依頼した場合に起動します。ログイン済みのChromeからのCookie抽出、ブラウザー上でのスクロールによる全投稿の収集、投稿日時順のダウンロードに対応します。Instagramと明示されていなくても、「このアカウントの写真をダウンロードして」とだけ依頼された場合に使用します。リンクがinstagram.comなら起動してください。

TypingMindでZerox Ins Photo Downloaderを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Zerox Ins Photo Downloaderはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにZerox Ins Photo Downloaderをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/ZeroxZhang/zerox-skills/tree/main/zerox-ins-photo-downloaderを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Zerox Ins Photo Downloaderを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Zerox Ins Photo Downloaderで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもZerox Ins Photo Downloaderを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Zerox Ins Photo Downloader」は無料ですか?

ZeroxZhangがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇