instaloader / instaloader

Download pictures (or videos) along with their captions and other metadata from Instagram.
https://instaloader.github.io/
MIT License
8.8k stars 1.18k forks source link

Custom sleep timer between requests. #1220

Closed calvinthefreak closed 3 years ago

calvinthefreak commented 3 years ago

Provide us a use case of the feature How could the user invoke the new function? Which problem would it solve? If new information is obtained, how would it be further processed?

If you append an argument like --request-limit = seconds (between doing another request)

The Problem is, that I am once upon a time (about each 3 Months) will backup all my followers posts. Instagram hates me and throws a lot of 429 if I do this. The reason for this is just the plain massive count of requests I am going to make.

Describe the solution you'd like A clear and concise description of what you want to happen.

Introduce an option, where you can define an custom time to wait between requests to the API and the Image-CDN.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Currently I am doing this by limiting the recources (56k download speed) to the LXC container, but not quite working well, still getting a lot of 429.

If the feature request is accepted, would you be willing to submit a pull request? No - I am not good at Python, but can help in the topic of Bash.

Additional context Add any other context about the feature request here.

calvinthefreak commented 3 years ago

To add to this, I am using the script via Bash, so no fancy Python implementation, I am relying on the cli arguments, that Instaloader has.

/usr/local/bin/instaloader -l $USERNAME -p $PASSWORD @$USERNAME --no-captions --dirname-pattern= --filename-pattern={owner_id}/{date_utc:%Y}/{date_utc:%m}/{dateutc:%Y-%m-%d%H-%M-%S}_{profile}

I know, passwords on CLI is bad, but no worry, its a burner account.

calvinthefreak commented 3 years ago

related to #1218

Thammus commented 3 years ago

Duplicate of #1006.