Hi Friends, I have an issue....I can't use the function follow by tags.
the error is the following
Thank you all for the support and have a nice weekend
hi @cormo1990
pull latest commits or add that missing logfolder
by hand near line 1643 (in follow_by_tags
definition at instapy.py
file)
followed += follow_user(self.browser,
self.follow_restrict,
self.username,
user_name,
self.blacklist,
self.logger, # dont forget comma here
self.logfolder) #add this missing `self.logfolder`
Thank you so much @uluQulu for the support!
I already test it and it works. Your explanation is simply and clear, thanks for your excellent work.
PROBLEM SOLVED.
Is it possible set the "sleep time" also in this action or not?
Welcome @cormo1990 :-)
do you want to increase/decrease sleeping time per follows in this feature follow_by_tags
or generally in the program or somewhere else?
Only in "follow_by_tags" .
in the picture below, it will follow 1000 account without sleep so probably I'll be banned.
I hope I explained myself well...:)
thanks for the support
Right @cormo1990
follow_by_tags()
followings are handled by follow_user()
functions which is standalone follower
It really needs to sleep after some amount of follows.,
I've written these lines for you, open up follow_by_tags()
function in instapy.py
file and modify with these changes
tags = tags or []
linetime_break = random.randint(7, 14)
follow_counter = 0
else
statement (must be at indentation level of else
)follow_counter = followed if followed>follow_counter else follow_counter
if (followed != 0 and
follow_counter==followed and
followed % time_break == 0) :
follow_counter += 1
time_break = random.randint(7, 14) #reset time break value
nap = random.randint(427, 600)
self.logger.info("I've followed {} users, gonna sleep some {} minutes".format(followed, ceil(nap/60)))
sleep (nap)
_Basically, you can put time break to 10 ( time_break=10
) just to sleep after every 10th follow or (recommended ->) you can use randomized values as I did above (_e.g. my example chooses between 7 and 14_)
It's the same for sleep()
, you can sleep after 10 minutes (500
seconds) or really randomized time, e.g. between 427
and 600
seconds_
Choose desired time & time break amount to sleep, but mind that per hour 60 follows is a good value
BTW I have not tested xD
if sth doesn't work as expected, please let me know :)
Unfortunately it doesn't work...can you explain more exactly the row where copy that code?
thanks a lot
@cormo1990
_my instapy.py
file has lots of modifications so that i can't be sure which line you will edit..._
you can replace follow_by_tags()
method in instapy.py
file with this
@uluQulu I found my mistake, now i'am testing the previous version.
I'll let you know in a few minutes. thanks bro
@uluQulu I can't set up the follow limit and the time of sleep, the bot continue following account...
can you help me?
I also try to replace follow_by_tags() but the bot don't start...
@uluQulu i recovered the previous version. the follow by tag works but NOT the sleep mode.
NOTE: I don't modify your default parameter
@cormo1990
In the screenshot attached above you have added else:
I haven't said, I just said add those lines after the existing else
statement..
send your original instapy.py
file, I will merge it, you have probably missed some indentation
(_use pastebin.com or github's gist to share it_)
Hey @cormo1990
I've just tested it and found a mistake that was making sleep not work :/
_to solve_, replace ==
with >
as in below
so this line,
follow_counter = followed if followed==follow_counter else follow_counter
will be
follow_counter = followed if followed>follow_counter else follow_counter
- _I've updated the lines above as well as the gist link with this change and an extra logger message_
Good Morning @uluQulu ,
thanks for your help and fast reply. I do some test but the sleep mode don't work.
i zipped my instapy.py file, can you check what i do wrong? thanks a lot
instapy.zip
@cormo1990
_you've misapplied else
part.._
Here is fixed gist
@uluQulu Amazing man!
now works perfect! thank you again for your availability and work.
hands up for you :)
Most helpful comment
@cormo1990
_you've misapplied
else
part.._Here is fixed gist