rhiever / TwitterFollowBot

A Python bot that automates several actions on Twitter, such as following users and favoriting tweets.
GNU General Public License v3.0
1.31k stars 447 forks source link

seemingly idle #81

Closed Karlheinzniebuhr closed 8 years ago

Karlheinzniebuhr commented 8 years ago

I keep getting this, running inside a virtual environment..


Choosing time between 10 and 60 - waiting 53 seconds before action

no matter what tests I do.. am I doing something wrong?

this is my code


from TwitterFollowBot import TwitterBot
my_bot = TwitterBot()

# sync to use less API time
my_bot.sync_follows()

my_bot.auto_rt("#node", count=5)
rhiever commented 8 years ago

Change the

FOLLOW_BACKOFF_MIN_SECONDS:10
FOLLOW_BACKOFF_MAX_SECONDS:60

in your config.txt to a small value. It's important to have a short delay so you don't quickly hit the API rate limit.

Karlheinzniebuhr commented 8 years ago

ok my problem is that nothing happens, I follow myself and tweet with the keywords but no reaction.. is there a way to get a more verbose log, to detect possible errors? image

rhiever commented 8 years ago

The code for auto_rt is here: https://github.com/rhiever/TwitterFollowBot/blob/master/TwitterFollowBot/__init__.py#L255

It actually shouldn't be waiting (bug in #77) on an auto_rt, so I don't know what's going on there. I advise digging into the code.

Karlheinzniebuhr commented 8 years ago

it works now, I suggest changing the count from 100 to 10 and having random delay similar to this

def check():
print('checking')
my_bot.auto_add_to_list("#TwitterBot", "twitterbot-list", count=10)
delay = randint(30, 120)
print('waiting '+str(delay)+' seconds..')
threading.Timer(delay, check).start()
check()

this prevents rate limiting for me very nicely..