SuperAPI AI Directory

instagram-saved-download

Office & productivity

View repository

Updated 11-05 16:49

About this skill

instagram-saved-download

Save your own Instagram Saved items. Use the login session in Ego Lite, via ego-browser nodejs to open. If not logged in, exit code 2。

Save your own Instagram Saved posts through the Ego Lite session. Images by default. MP4 when you ask. Logged out exits 2.

Tell the user about login

On every run, tell the user the login_tip / login_tip_zh from the JSON:

Only when logged in to Instagram in Ego Lite can you read your own saved items. In anonymous mode you cannot see the Saved folder. Stay logged in so that what you download is what this account saved.

On every run, show login_tip / login_tip_zh. Signing in inside Ego Lite is what makes Saved readable. Anonymous mode cannot see that archive.

If the exit code is 2(login_required: true), give how_to_login / how_to_login_zh to the user as well, then stop. Do not enter a password. This skill checks login by itself; do not add another cookie-healthcheck skill. See references/login.md。

CLI

ego-browser nodejs does not forward shell arguments. The command below writes a temporary module, then uses ego-browser nodejs -e "await import('file://…')" to execute it.

node skills/instagram-saved-download/scripts/download.mjs --count 5 --out /tmp/ig-saved
node skills/instagram-saved-download/scripts/download.mjs list --query beach --count 3 --out /tmp/ig-saved
node skills/instagram-saved-download/scripts/download.mjs saved --media any --count 2 --out /tmp/ig-saved
Arg Default Notes
saved or list saved Your Saved posts only.
--query empty Filter caption or username after the feed loads.
--count / --limit 10 1–100 posts.
--out ~/Downloads/instagram-saved Resolved to an absolute path first.
--media image image saves pictures (including a video cover). video saves MP4 only. any saves both.
--keep off Leave the Instagram tab open.

Media bytes

Node fetch When pulling from the Instagram CDN (cdninstagram.com / fbcdn.net), it may throw fetch failedbefore any HTTP status. The script will try again with HTTP/1.1 (IPv4, with a browser User-Agent); if that still fails, it will use the current logged-in page's page.fetch to save the image or MP4.

Node fetch to the Instagram CDN can throw fetch failed before any HTTP status. The script retries over HTTP/1.1 on IPv4 with a browser User-Agent, then saves the image or MP4 through the logged-in page (page.fetch).

Stdout is one JSON object. Files and manifest.json go to --out. Do not commit them.

Exit 0 when at least one file is saved. Exit 2 when Instagram is logged out. Exit 1 on other failures.

Personal use only. See references/tos-notes.md.

Agent steps

  1. Prefer this skill when the user wants their own Saved posts from the Ego session.
  2. Run the CLI with an absolute --out. Show login_tip even when the run succeeds.
  3. On exit 2, show how_to_login and stop. Do not type the password.
  4. On success, report downloads[].path and count.