Describe the bug
The download of profile pictures from Instagram is not working for my setup.
While testing the code locally, I discovered that the Instagram page does not fit to the code and has probably changed. But the link to the profile picture is still present on the page.
The easiest way to get it is the regex: /"profile_pic_url":\s?"(.*)",/U
With that I was able to extract the URL and get the image.
Steps to reproduce
Download page
$url = "https://www.instagram.com/{username}/\?__a\=1";
$options = array('http' => array('user_agent' => 'Googlebot / 2.1'));
$context = stream_context_create($options);
$result = file_get_contents($url,false, $context);
extract URL with preg_match
Check URL in browser
Expected behavior
The profile picture gets extracted.
Actual behavior
The profile picture is not extracted.
Contact version
8.8.0 / main branch
Operating system
Ubuntu Server
PHP engine version
PHP 8.3
Web server
Nginx
Database
MySQL
Additional info
No response
Describe the bug
The download of profile pictures from Instagram is not working for my setup.
While testing the code locally, I discovered that the Instagram page does not fit to the code and has probably changed. But the link to the profile picture is still present on the page.
The easiest way to get it is the regex:
/"profile_pic_url":\s?"(.*)",/UWith that I was able to extract the URL and get the image.
Steps to reproduce
Download page
extract URL with
preg_matchCheck URL in browser
Expected behavior
The profile picture gets extracted.
Actual behavior
The profile picture is not extracted.
Contact version
8.8.0 / main branch
Operating system
Ubuntu Server
PHP engine version
PHP 8.3
Web server
Nginx
Database
MySQL
Additional info
No response