Not sure if this would help in your case but I once was ripping images from a… Homework site… and after recognizing all of the media files were named as _001, _002…, I created an if loop and used wget to mass download. Maybe Instagram does this for raw image links?