instagram-php-scraper icon indicating copy to clipboard operation
instagram-php-scraper copied to clipboard

getMedias dont works

Open brassoy opened this issue 1 year ago • 6 comments

when i try to getMedias say me

InstagramScraper\Exception\InstagramException Response code is 200: OK.Something went wrong. Please report issue.

stack trace throw error here

Instagram.php:742

if (!isset($userArray['entry_data']['ProfilePage'][0]['graphql']['user'])) {

        throw new InstagramException('Response code is ' . $response->code . ': ' . static::httpCodeToString($response->code) . '.' .

                                     'Something went wrong. Please report issue.', $response->code, static::getErrorBody($response->body));

    }

I get medias with:

$instagram = new \InstagramScraper\Instagram(new \GuzzleHttp\Client()); $nonPrivateAccountMedias = $instagram->getMedias($clinic->instagram_user,$count);

during months works ok

thank you!

brassoy avatar Jul 28 '22 05:07 brassoy

Warning 2022-06-01 - Instagram changed his DOM content and profile data loading

It seems to be a problem with trying to start a new session because Instagram has introduced a login with cookies. @raiym Any suggestions about solving the problem?

Thank you!

NickNiceGuy avatar Aug 03 '22 07:08 NickNiceGuy

in raiym\instagram-php-scraper\src\InstagramScraper\Instagram.php

change function getMedias

$account = $this->getAccount($username);

replace with

$account = $this->getAccountInfo($username);

and done

brucekasinsky avatar Aug 04 '22 05:08 brucekasinsky

it works! thank you

brassoy avatar Aug 04 '22 17:08 brassoy

Life savers same issue for me today

INKsearch avatar Aug 25 '22 08:08 INKsearch

Is this considered a fix? If so, how long until it becomes part of the code or next version?

mossmoss avatar Aug 30 '22 15:08 mossmoss

do you have idea im facing Undefined property: stdClass::$authenticated issue

ffaady avatar Sep 02 '22 15:09 ffaady