Closed edwardselig closed 7 years ago
I learned why this is happening. During a 429 response Instagram returns an object as the body of the response. Heres a snippet of the resonse:
Unirest\Response::__set_state(array( 'code' => 429, 'raw_body' => '{"message": "Please wait a few minutes before you try again.", "status": "fail"}', 'body' => stdClass::__set_state(array( 'message' => 'Please wait a few minutes before you try again.', 'status' => 'fail', )),
Here is a suggested solution: https://github.com/edwardselig/instagram-php-scraper/commit/13af7c8a0097e0922422e08837e969ed6497b625
also I did some testing and it seems like the rate limit is around 3000 requests with a timeout of 80 seconds. I dont know what interval the 3000 request have to be in.
PHP Catchable fatal error: Object of class stdClass could not be converted to string in /var/www/html/home/instagram-php-scraper-master/src/InstagramScraper/Instagram.php on line 25. I cannot figure out why this is happening.
Update: I seem to be getting a 429 error