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 445 forks source link

Offset to auto_follow_followers_of_user? #56

Open JSTQ opened 9 years ago

JSTQ commented 9 years ago

Currently if i get like 5 users, it gets same people every time until someone else will follow. Is there a way to get 500 users with 500 offset?

Also, what is the limit of this request?

rhiever commented 9 years ago

It certainly seems feasible to allow an offset parameter to the auto_follow_followers_of_user function. All it would do is query all of the person's followers, then use list slicing to start at the index specified by the parameter.

I added this as a feature enhancement. I won't have time to work on it any time soon, but it wouldn't take too much work to implement if you (or someone wants to send a PR):

1) Add an offset parameter to https://github.com/rhiever/TwitterFollowBot/blob/master/TwitterFollowBot/__init__.py#L344

2) Change the slicing here to start at the offset instead: https://github.com/rhiever/TwitterFollowBot/blob/master/TwitterFollowBot/__init__.py#L350