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)
But login and password will be required
On Mar 16, 2017 15:27, “Raiymbek Kapishev” r.kapishev@gmail.com wrote:
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: