TwitterFollowBot icon indicating copy to clipboard operation
TwitterFollowBot copied to clipboard

exclude users or words from being auto_* by providing a filter function

Open Nowaker opened this issue 11 years ago • 4 comments

Not a true Python code, but you'll get the idea.

def filter(tweet):
  if tweet["user"]["screen_name"] == 'Some Spammer' || tweet["text"].contains "banned word":
    return false
  return true

auto_fav("phrase", count=1000, filter)

Nowaker avatar Oct 07 '14 11:10 Nowaker

So you are saying 'words' a user is using like "*" would be a wildcard to python thus they'd be favorited? and you want to prevent that.... right?

Nickfost avatar Oct 19 '14 03:10 Nickfost

No, not at all. See the example code.

Nowaker avatar Oct 19 '14 05:10 Nowaker

oh i see. i over thought this based upon the title. hopefully something like this gets implemented.

Nickfost avatar Oct 19 '14 17:10 Nickfost

Good idea. Not sure if I'll have time to implement this in the near future (as evidenced by taking 2 weeks to respond - sorry!), but it's on the TODO list now.

rhiever avatar Oct 22 '14 19:10 rhiever