Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to slow down request via command line? #2172

Closed
sgtpepperaut opened this issue Jan 20, 2024 · 5 comments
Closed

How to slow down request via command line? #2172

sgtpepperaut opened this issue Jan 20, 2024 · 5 comments
Labels
question Question stale Issue is inactive for a long time

Comments

@sgtpepperaut
Copy link

Instagram seems to be very strict with rate limits these days. Im using my own account and my own IP.
Even when trying to only "fastupdate" one profile i am getting kicked out and getting a 401.

When i return to the browser version i get:

_"We suspect automated behavior on your account
To prevent your account from being temporarily restricted or permanently disabled, ensure that no other users or tools have access to your account and that you're following our Terms of Use. Also consider changing your password to a stronger one to prevent unauthorized access to your account by third parties."

Is there a way i can slow down the request?

@sgtpepperaut sgtpepperaut added the question Question label Jan 20, 2024
@tari3x
Copy link

tari3x commented Jan 22, 2024

Here are the changes that work for me. I should maybe submit a pull request.

# in ~/.local/lib/instaloadercontext.py
# in class RateController:
#
# fast_sleeps = 10
#
#    def sleep(self, secs: float):
#        global fast_sleeps
#        if fast_sleeps > 0:
#            fast_sleeps = fast_sleeps - 1
#        else:
#            wait_time = random.uniform(15, 30)
#            print(wait_time)
#            time.sleep(wait_time)
#
# Remove > 0 guards in front of sleep further down

@smasonlawrence
Copy link

Here are the changes that work for me. I should maybe submit a pull request.

# in ~/.local/lib/instaloadercontext.py
# in class RateController:
#
# fast_sleeps = 10
#
#    def sleep(self, secs: float):
#        global fast_sleeps
#        if fast_sleeps > 0:
#            fast_sleeps = fast_sleeps - 1
#        else:
#            wait_time = random.uniform(15, 30)
#            print(wait_time)
#            time.sleep(wait_time)
#
# Remove > 0 guards in front of sleep further down

Can you please explain where I make this change? I cannot find any of these strings in any of the py files.. sorry, sorta python noob here still figuring things out.

@tari3x tari3x mentioned this issue Jan 25, 2024
@tari3x
Copy link

tari3x commented Jan 25, 2024

Made a pull request.

Copy link

There has been no activity on this question for an extended period of time. This issue will be closed after further 14 days of inactivity.

@github-actions github-actions bot added the stale Issue is inactive for a long time label Feb 15, 2024
@tari3x
Copy link

tari3x commented Feb 15, 2024

Still pertinent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question stale Issue is inactive for a long time
Projects
None yet
Development

No branches or pull requests

3 participants