## Expected Behavior
Please see the attached image.
I expect to follow 1000 users from a selected user follower list.
## Current Behavior
At the moment i can't follow 1000 users, the message is:
-"username" less user to follow than requested
the number of followers of the account selected is around 20K
Thanks for the support
i hope that the problem is explain clearly.
I believe you have specified a set_lower_follower_count(limit = 20000)
that's why the code is preventing those users to be followed.
Just remove that limit
Thanks for the reply @MrBeardedGuy , actually i have setted as you can see in the pic attached only that limit. can you help me?
thanks
I have same problem.
But it is not for limits or something like that but for function "follow_through_dialog". It's start scrolling down and after few scrolls instagram will stop loading. Resault is "Less users to follow than requested."
Can somebady help ?
@uluQulu hey man, can you help us with that issue?
thanks a lot for the support.
I noticed you have a line of code that's out of place... set_user_interact
....
Check https://github.com/timgrossmann/InstaPy#followunfollowexclude-not-working
Essentially, all the set_* methods have to be before like_by_tags or like_by_locations or unfollow. This is also implicit in all the exmples and quickstart.py
@MrBeardedGuy I try to follow your suggestion but i have the same problem...any other solution?
thanks
ello @cormo1990
You have to loop until gets desired amount
I have posted a solution similar to this here
Thanks for the answer @uluQulu, I understand what you wrote in the suggested post but honestly I m worry to wrote something wrong in the actually script...and I don't know where...can you help me please? thanks and have a good weekend dude
@uluQulu man i tried to modify the script but all gone wrong...fortunally i have a backup copy.
please can you support me?
thanks so much in advance
@SPQRBrutus is right, it stops loading after certain amount of scrolls, I have found out in previous tests that it does allow around 100 _continious_ scrolls per 10 minutes and once exceeds limit, it does throw a 429 Too Many Requests
error
In order to get desired amount of links, we must take breaks, then continue the loop of getting links
taking breaks is identical to features that generate huge amount of scrolls in one cycle
For ease of merge, I've tried to follow minimality
@cormo1990 now open up unfollow_util.py file and find follow_through_dialog
function and apply the new changes as in below for solution in _three_ steps:
1. _After_ if randomize and amount >= 3:
_statement add these 4 lines below:_
if randomize and amount >= 3: ##DON'T touch this line
# expanding the popultaion for better sampling distribution ##DON'T touch this line
amount = amount * 3 ##DON'T touch this line
if amount > int(allfollowing*0.85): #taking 85 percent of possible amounts is a safe study ##ADD this lines
amount = int(allfollowing*0.85) ##ADD this line
try_again = 0 ##ADD this line
sc_rolled = 0 #ADD this line
2. _Before_ # get follow buttons. This approch will find the follow buttons and
_line, remove these 2 lines:_
# scroll down the page ##REMOVE this line
scroll_bottom(browser, dialog, allfollowing) ##REMOVE this line
3. _Replace the_ entire while (total_list < amount) and not abort:
_statement with this:_
while (total_list < amount) and not abort:
before_scroll = total_list
for i in range(3):
scroll_bottom(browser, dialog, 2)
sc_rolled += 1
sleep(random.randint(1, 2))
follow_buttons = dialog.find_elements_by_xpath(
"//div/div/span/button[text()='Follow']")
total_list = len(follow_buttons)
abort = (before_scroll == total_list)
if abort:
if total_list < real_amount:
logger.info("Failed to load desired amount of users")
if sc_rolled > 85: #you may want to use up to 100
if total_list < amount:
logger.info("Too many requests sent! attempt: {} | gathered links: {} ~sleeping a bit ".format(try_again+1, total_list))
sleep(random.randint(600, 655))
try_again += 1
sc_rolled = 0
_It might look huge but actually, it just adds 17 new lines and removes 5_
I have tested several times with 1000 and 2000 amounts and the design is intended to work with unlimited amounts just by taking breaks, but if something works unexpectedly, please notify, I will have a look
Also, this solution is fixing other features which are also using
follow_through_dialog
function
and is a general approach
_In one scroll it will open up around 10 new users, so in one cycle with the default values I put above it will open up 890 new usernames then will take a break to continue again..._
Thanks so much for the support @uluQulu ,
I've just attached my unfollow_util.py
can you modify exactly please?
I try to edit with your suggestion but probably I do some mistakes...sorry
Thanks a lot again
Here it is 🍬 @cormo1990
Good luck!
Thank you @uluQulu.
I've just tested but doesn't work.
i attached the traceback
@uluQulu Man....if i restore the backup of InstaPy i obtain the same error...i don't know what to do...
@uluQulu I have to reinstall InstaPy totally and now works but without your modify...is compatible with the latest version of InstaPy downloadable?
thanks
@uluQulu is it possible implement that modification in the main version? i suppose that this is helpful for all users...thanks man for the excellent work
@cormo1990 that error was for Instagram changes
Hi @cormo1990
İ have posted a solution for that problem in #1338
You will have to handle just one exception
Also, it has nothing to do with last modification we did here, it is just a temporary outage error from FB servers
Yes it happens to many I guess, PR with fix would be so good
_I checked source files last time edited for you, if anything changed related to the fixed lines, it might cause problems, otherwise it will work any time reapplied_
Please notify if any problem happens, I will help☺
Hello, I have the same problem (scroll) but with "session.follow_user_likers", I changed the unfollow_util.py, but nothing change, is it right for this case change that py?,
Hello @aleeepp,
You should know that, this fix is solving the features those use follow_through_dialog
function. But follow_user_likers
feature works completely differently and I think you should start modifying it in likers_from_photo
function of commenters_util.py file.
@uluQulu was this new scroll code merged into the master
already? I had been using the scroll code we worked out before a while back and it functions, but makes the program complete the run very slowly
hi @jeremyccheung,
Yet, this method is neither merged with master, nor exists in a PR.
I am not so good at memorizing, as I forgot about that scroller, but as far as I remember the methodology we used: _if you decide to get a huge list of elements, then you will end up using break times againist timeouts and request limits._
What you can do? - _try decreasing sleep times and increase scroll counters, use the most efficient values_
For which feature it was written?
_if you give a link of that work, I will remember_ :)
@uluQulu ,, Thks!!!!, I am noob with Python and I opened the file commenters_util.py, and i didnt find somethig relationed whit scroll, is this file I 'll need to change?
@uluQulu This code works amazing; it's loading the lists and starting follows significantly faster than the one we had developed. Your recollection sounds about right and it was a slight modification from the code you had developed for scrolling hashtags I believe. Great work!
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
@uluQulu hey man, can you help us with that issue?
thanks a lot for the support.