postaddictme / instagram-php-scraper

Get account information, photos, videos, stories and comments.

Home Page:https://packagist.org/packages/raiym/instagram-php-scraper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error when trying to fetch data use getMediaByUrl()

nuzulr24 opened this issue · comments

commented

hi contributor and my friends.
i have one problem when call this method and then i got response
Message: Media with this code does not exist but the media url is also exist.

Same thing happens for me. Proof of concept:

<?php
use InstagramScraper\Instagram;
use GuzzleHttp\Client;

$instagram = Instagram::withCredentials( new Client(), '', '', null );
$instagram->loginWithSessionId( '<your-user-session-id-goes-here>' );

$media = $instagram->getMediaByUrl( 'https://www.instagram.com/p/BsOGulcndj-/' );
var_dump( $media );

Response from request to Instagram:

for (;;);{"__ar":1,"error":1357004,"errorSummary":"Sorry, something went wrong","errorDescription":"Please try closing and re-opening your browser window.","payload":null,"hsrp":{"hblp":{"consistency":{"rev":1005858897}}},"lid":"7121366591489386466"}'

Maybe related to #1067?

I've got a pull request up to fix this. See #1083

commented

thanks for resolving thats problem @kingkool68