S
S
SANYAAAASSSS2018-06-14 15:04:18
API
SANYAAAASSSS, 2018-06-14 15:04:18

Link to download avatars from instagram?

The client leaves a link to his Instagram account. How can I get a link to download his avatar?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kermit664, 2018-07-05
@kermit664

As an option: go to the element code (right-click > "explore element / view element code" - this option is called differently in different browsers). A line of code with a link to the image should automatically be highlighted, even a preview will pop up there. Further simply: follow the direct link to the image and download. The only negative - the resolution will be small (150 by 150 like).

S
Skeaper, 2019-05-02
@Skeaper

<?php
  $insta_source = file_get_contents('https://www.instagram.com/gopro');
  $shards = explode('window._sharedData = ', $insta_source);
  $insta_json = explode(';</script>', $shards[1]);
  $insta_array = json_decode($insta_json[0], TRUE);
  echo '<pre>'; print_r($insta_array); echo '</pre>';

$profile_pic_url = $insta_array['entry_data']['ProfilePage'][0]['graphql']['user']['profile_pic_url'];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question