4

I am not sure how to fix the following piece of code to overcome the rate limits. Also, I am not sure why it stops at 10 posts even though I set the max_count to 100.

code:

import instaloader

loader= instaloader.Instaloader(download_comments=True,
                    download_videos=True,
                    download_geotags=True,
                    save_metadata=True)

loader.download_hashtag('fashion', max_count=100, fast_update=False, profile_pic=False)

Problem is:

(base) mona@mona:~/research/insta-scrape$ python instaloader_tester.py 
Retrieving pictures with hashtag #fashion...
[  1/100] #fashion/2020-11-30_03-20-10_UTC.jpg [@___eshika__rao   @ieshu_rao …] comments json 
[  2/100] #fashion/2020-11-30_03-04-22_UTC.jpg [would you let me ride shotgun…] comments json 
[  3/100] #fashion/2020-11-30_03-02-28_UTC.jpg [✨I bite back ✨] 
HTTP redirect from https://www.instagram.com/graphql/query to https://www.instagram.com/accounts/login/
JSON Query to graphql/query: 429 Too Many Requests: redirected to login [retrying; skip with ^C]
Requests within last 10/11/20/22/30/60 minutes grouped by type:
                              other:    1    1    1    1    1    1
   2b0673e0dc4580674a88d426fe00ea90:    3    3    3    3    3    3
 * 97b41c52301f77ce508f55e66d17620e:    4    4    4    4    4    4
Instagram responded with HTTP error "429 - Too Many Requests". Please
do not run multiple instances of Instaloader in parallel or within
short sequence. Also, do not use any Instagram App while Instaloader
is running.
The request will be retried in 655 seconds, at 23:04.
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
  • You don't overcome the rate limiting, you obey the rate limiting by folliwing the advices from the error message. – Klaus D. Nov 30 '20 at 04:10
  • I have previously worked with other Instagram APIs and their rate limit was much less. I think 10 min wait is like a lot of wait! usually it was 5 seconds previously – Mona Jalal Nov 30 '20 at 04:14
  • I have the same issue. I have used instaloader for a few months and I never had any problems, now I'm getting the same error after 2 or 3 analysed posts. it seams that you can send 1 to 5 requests per minute, or something like that. I have tried today from 2 different machines and then my friend tried from his machine (from his house) and he had the same error right away – taga Dec 03 '20 at 16:26
  • Any updates???? – A. Amini Mar 25 '21 at 08:20

0 Answers0