Skip to content

Instantly share code, notes, and snippets.

@uluQulu
Last active April 23, 2021 17:10
Show Gist options
  • Save uluQulu/cd473460c1d89d054356d94a5b3dff2c to your computer and use it in GitHub Desktop.
Save uluQulu/cd473460c1d89d054356d94a5b3dff2c to your computer and use it in GitHub Desktop.
Description of Quota Supervisor and its usage

Take Full Control Of The Actions With The Most Sophisticated Approaches:

likes, comments, follows, unfollows, server calls

in daily/hourly basis fully featured and highly flexible easily maintainable universal solution

Quota Supervisor

session.set_quota_supervisor(enabled=True, sleep_after=['likes', 'comments_d', 'follows', 'unfollows', 'server_calls_h'], sleepyhead=True, stochastic_flow=True, notify_me=True,
                              peak_likes=(57, 585),
                               peak_comments=(21, 182),
                                peak_follows=(48, None),
                                 peak_unfollows=(35, 402),
                                  peak_server_calls=(None, 4700))

BRIEF REVIEW OF PARAMETERS

enabled=True   #to activate 
#or
enabled=False   #to deactivate supervisor any time
peak_likes=(hourly, daily)    #restricts actions to hourly/daily peaks

If you don't want to supervise likes at all, simply remove peak_likes param or use peak_likes=(None, None)

Notice: peak_likes=(50) will not work, use peak_likes=(50, None) for hourly peak and, peak_likes=(None, 50) for daily peak, also don't include 0 in peaks, instead simply put None

#examples:
 peak_server_calls=(500, 4745)  #will supervise server calls with hourly peak of 500 and daily peak of 4745
 peak_likes=(70, None)  #will supervise only hourly likes with peak of 70
 peak_unfollows=(None, 350)  #will supervise only daily unfollows with peak of 350
 peak_comments=(None, None)  #will not supervise comments at all

Once likes reach peak, it will jump every like , yet will do available actions (e.g. follow or unfollow) Every action will be jumped separately after reaching it's peak, except comments. Cos commenting without a like isn't really welcomed that's when like peaks is reached, it will jump comments, too! Same form applies to all actions: specify which actions (in which intervals- hourly, daily or both) you want to supervise..

sleep_after=[ ]  #put InstaPy to sleep after reaching peak rather than jumping

Any action ['likes', 'comments', 'follows', 'unfollows', 'server_calls'] can be included; As if you want to sleep only after reaching hourly like peak put 'likes_h' or put 'likes_d' for sleeping only after reaching daily like peaks

Notice: there can be either 'likes' (for both hourly and daily sleep) or 'likes_h' (for hourly sleep only) or 'likes_d' (for daily sleep only)

#examples:
 sleep_after=['likes_h']   #will sleep after reaching hourly like peaks
 sleep_after=['likes_d', 'follows', 'server_calls_h']   #will sleep after reaching daily like peak, follow peaks(hourly or daily) and hourly server_call peak

Once gone to sleep it will wake up as new hour/day arrives and continue doing actions

sleepyhead=True   #can help to sound more humanly which will wake Instapy up a little bit later

Each time generates a randomly chosen time interval around accurate wake up time.

E.g: if remaining time is 17 minutes, it will sleep 20 minutes instead.. (each time at random time interval)

stochastic_flow=True   #provides smooth peak values!

Every hour/day it will generate peaks at close range around your original peaks but below them.

E.g: your peak likes hourly is 45, next hour peak will be 39, the next 43,..

notify_me=True   #sends toast notifications about the important states of the supervisor 

Notifies user once sleep, wake up or exit happened directly from OS, supported in Windows, Linux and Mac

BY DEFAULT: Server Calls have no jump mode, once server calls exceed the peak, it will exit program. You can add it to sleep_after or just remove server call peaks.

Some of us may not have met a ban yet, though, slight abuse of breaking rules won’t get your account blocked, but all actions get summed up, and if at a certain period a critical amount of such actions piles up, it will lead to your page being banned or pessimized, it's time to wear safety belt on the long run!

check-out for more details and feel free to ask anything to discuss regarding design or components at our Slack!

Also see structure (PNG)

@dpascoa
Copy link

dpascoa commented Mar 29, 2019

Thanks for the information. I have a doubt. How do I know how much time is quota supervisor going to sleep when it reaches one of the parameters inside sleep_after ? Is it possible to determine a time, because I've been testing and sometime I get like minutes, other times I get 2 hours, and even other times I get 12 hours.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment