This answer contains a method by which an Instagram user's images can be obtained from their username without authenticating as a user (using the https://instagram.com/[USER_ID]/media URL). I'm looking for a similar way to obtain a user's profile picture without authentication as a user.
Usually, requests to /media
contain a link to the user's profile somewhere, but these links all return 500 errors for me.
What's the best way to get a user's profile picture from their username? I'd like to do this from client-side JS if possible, so solutions involving HTML parsing are sub-optimal