Answer the question
In order to leave comments, you need to log in
How to get a direct link to ava instagram?
How to get a direct link to ava instagram?
Answer the question
In order to leave comments, you need to log in
And here's an even easier way than parsing HTML.
We make a request to the address " https://www.instagram.com/{username}/?__a=1 ", where {username} is the nickname of the desired user.
$username = "tregor_live";
$response = file_get_contents("https://www.instagram.com/{$username}/?__a=1");
$acccount = json_decode($response, true);
"$account['graphql']['user']['profile_pic_url_hd']"
We open the developer console, look at the desired element with the inspector, voila, this is how Ava's element looks on Instagram
The link will be a file of 150x150 pixels, which is the ava of the profile you need
I wrote a small library for such a case ( link to github ). It turned out to be only 2Kb and does not require access_token and client_id from Instagram.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question