How to limit users by the number of following
Now only there is a limit on the number of followers
session.set_upper_follower_count(limit = 250)
session.set_lower_follower_count(limit = 1)
how to set a limit for following
Sorry my english is not very good.
how to create a user filter for the subscription, use the number of his subscriptions to other users?
Screenshot
hi @DimIsaev, so you want:
set_upper_following_count(limit=1299)
set_upper_following_count(limit=199)
it is very easy to achieve, do you really need it?
@uluQulu
yes yes it is very necessary
PS This setting can filter out not very attentive / not real users
it is impossible to monitor more than 500 users
Most likely these accounts are bots
Understood, @DimIsaev,
What about some sophisticated version?
session.set_relationship_bounds (enabled=True,
potency_ratio=1.25,
delimit_by_numbers=True,
max_followers=120000,
max_following=2200,
min_followers=442,
min_following=132)
potency_ratio==followers count/following countof a user
1. you can use potency_ratio or not (potency_ratio=None, delimit_by_numbers=True), - _will decide only by your pre-defined max & min values regardless of the potency_ratio_
2. also you can use only potency_ratio (potency_ratio=1.5, delimit_by_numbers=False) - _will decide per potency_ratio regardless of the counts_
3. or use both potency_ratio and predefined min&max values (potency_ratio=1.5, delimit_by_numbers=True) - _will decide per potency_ratio & your predefined min & max values_
@uluQulu
Yes, Will be very cool
I'm waiting for your implementation
@DimIsaev, it's done #1876
@uluQulu
tested the script with your patch
setting
session.set_relationship_bounds(enabled=True,
# potency_ratio=1.2,
# delimit_by_numbers=True,
max_followers=500,
max_following=500,
min_followers=10,
min_following=10)
session.follow_user_followers(['chasy_shop_ns', 'chasy_stanica_leningradskaya'], amount=1000, randomize=False)
Do not filter accounts by the number of followers more than 500
@DimIsaev
you must use delimit_by_numbers=True in order to activate using max & min values but it is commented out there...
commenting out keyword arguments is a bad practice, have a look at README in the pulls page
@uluQulu
fixed it like this
session.set_relationship_bounds(enabled=True,
# potency_ratio=1.2,
delimit_by_numbers=True,
max_followers=500,
max_following=500,
min_followers=10,
min_following=10)
It did not help (
@DimIsaev,
Have a look at README, there writes, if you don't want to use potency_ratio just give it a value of None (potency_ratio = None)
commenting out keyword arguments is really a bad practice
If you have applied the changes as it is in #1876, your last configuration should work (_although it comments out_ potency_ratio) as expected.
But there is a problem, I just checked, the feature you are using and expecting set_relationship_bounds feature to route, is follower_user_followers WHICH does not request check_link utility, that's why you are disappointed.
For now, you can try set_relationship_ratio feature with those that request check_link utility (_just search for check_link in instapy.py file, and see whcih features request it and try with them, _e.g._ interact_user_following or like_by_tags,.._)
But that's a good point, after #1876 passes, I think to write some lines to make all involved features, alongside follow_user_followers, access set_relationship_bounds.
@uluQulu
Did I understand correctly, that after your patch the function set_relationship_bounds. will not work
until the merge # 1876?
@DimIsaev,
Those changes are in #1876, it does not matter whether you apply them manually or wait it gets merged. Change is a change.
As I've said in above comment, some features, like follow_user_followers are not requesting check_link utility, that's why they will not be affected after #1876
You should know that, prior methods
set_upper_follower_countandset_lower_follower_countwas not to work withfollow_user_followers, too
After it gets merged, If I find some time, I will make it work for follow_user_followers and some other features, too
@uluQulu
functional does not work correctly
sers who have an amount followers or following
more than the established limit
example
session.set_relationship_bounds(enabled=True,
potency_ratio=None,
delimit_by_numbers=True,
max_followers=500,
max_following=500,
min_followers=10,
min_following=10)
script selects
users
following or followers > 500
hi @DimIsaev,
Which features are you using and expecting the range in the delimiter values to be used?
e.g.,
follow_user_followers,like_by_tags,..
@uluQulu
session.follow_user_followers(['accounts1', 'accounts1', 'accounts1'], amount=1000, randomize=False)
It's clear, @DimIsaev,
Right, we have talked about it in last comments above and I promised to add support for those features..
But there is a thing I've realized lately: features like follow_user_followers are following people through a dialog where it does not open up users' profile pages. And here is the problem, to make relationship ratio verify those users, we must first navigate to those users' profile page (_to grab their followers/following counts_) and then return back, but it will break the entire loop and we will have to open dialog box again.
relationship ratiosdialog box and follow approved users.As you see, it is this complicated and it will cost us:
Having considered all those, do you really want it be implemented?
And here is the problem, to make relationship ratio verify those users, we must first navigate to those users' profile page (to grab their followers/following counts) and then return back, but it will break the entire loop and we will have to open dialog box again.
you can open a new browser window,
to get the number of followers and subscriptions
another variant
select arrays and process them
@DimIsaev,
I've thought about it long before, the idea of new tab. Which could be helpful for many other features, too!
But with my limited selenium knowledge, I thought it is not feasible.
_Now, I will rethink about it again..._
I didn't get the other variant, which arrays?
Also, opening/closing excessive amounts of new tab is prone to consume lots of memory and more importantly processor which could be bad...
And well, you meant new window which is more resource consumer action
other variant ) :
from the list of subscribers
eg
take an array of 600 accounts
and open each and check the number of followers and subscriptions
馃槈smart of you @DimIsaev,
_Actually you are suggesting to change the working behavior of some functions, I don't think it will be welcomed for some guys, but I know that for your need, it will be the best option!_
I've not thought of it yet cos I looked for solutions with the current tools, but changing functionality, I did not think of..
First free time I get I will implement it, amazing idea!
@uluQulu 馃
thanks. thanks
This is an important setting for filtering bots
I think it will be used by many.
Hey @DimIsaev,
I will look at your request today.
_probably lots of modifications will be done, stay around to test it馃浂_
@uluQulu
good news
I'm looking forward to it

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this problem still occurs, please open a new issue
Most helpful comment
other variant ) :
from the list of subscribers
eg
take an array of 600 accounts
and open each and check the number of followers and subscriptions