Instagram Feed Fetch Script

This should be ran in a browser

This script fetches the latest posts from an Instagram account and saves them to a JSON file. It uses the Instagram Basic Display API to fetch the posts and the fs module to save them to a JSON file.

let imageUrls = Array.from(
  document.querySelectorAll("._aagv img"),
  (img) => img.src
);

After that, you can go ahead and run

console.log({ imageUrls });

in order to see the image URLs in the console.