instagram-php-scraper: Get 404 when use function getMediasByTag #70

InstagramScraper\Exception\InstagramException Object ( [message:protected] => Response code is 404. Body:

Unbelievable, but the problem is solved if you install cookies (I loaded https://www.instagram.com/explore/tags/video/?__a=1&max_id=1 and copied them from the query, then inserted in /Unirest/Request.php on line 236)

$headers = [ ‘cookie’ => ‘simple cookies’ ];

public static function get($url, $headers = array(), $parameters = null, $username = null, $password = null) { $headers = [ 'cookie' => 'simple cookies' ]; return self::send(Method::GET, $url, $parameters, $headers, $username, $password); }

`require ‘/vendor/autoload.php’;

use InstagramScraper\Instagram;

$medias = Instagram::getMediasByTag(‘zara’, 30); echo json_encode($medias);`

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 33 (10 by maintainers)

Most upvoted comments

But login and password will be required

On Mar 16, 2017 15:27, “Raiymbek Kapishev” r.kapishev@gmail.com wrote:

Yes

On Mar 16, 2017 15:25, “Mateusz” notifications@github.com wrote:

@raiym https://github.com/raiym So if you fix the problem we will able to get all images by tag ? thx.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/postaddictme/instagram-php-scraper/issues/71#issuecomment-287041568, or mute the thread https://github.com/notifications/unsubscribe-auth/AFb0GRtBqjY33evRjbYNO1ePU2r10ohVks5rmSpDgaJpZM4Md2hb .

This is not a solution, is this library going to work by adding authentication and API key or is it going to be shut down?

@pinotarantino how can i try?

where I insert the url?

Do you can specific me all the steps?

If you’re aren’t logged in instagram the url isn’t working. And when i call the function in my php file return InstagramScraper\Exception\InstagramException Object ( [message:protected] => Response code is 404. Body: