0xfuturistic/Twitter-Giveaways-Bot

Ignore adult tweets [Solved]!

ItsOmarKhater opened this issue · 5 comments

It works perfectly!

I'd really appreciate it if you could add a function that skips inappropriate tweets, like those include "nudes", "sex" etc.
Because the bot keeps retweeting those kinds of tweets.
Thanks a lot for your great work!

Update:
I did it myself! it turned out to be pretty easy :)

  1. in main.py scroll down to find this line for tweet in searched_tweets:
    and just paste this line below it: if not any(y in tweet.text.lower().split() for y in config.skip_retweet_tags):
    make sure to add indentation before and after the above line.

  2. in config.py
    before the retweet_tags list
    add this list skip_retweet_tags = ["nude", "nudes" ,"tits" ,"booty" ,"boobs", "cum"] you can add any more words you want the bot to ignore.

Duuuuude, thank you so much !
Do you know how we can also add a: if tweet have less than "x" RT, then don't retweet ?

Duuuuude, thank you so much !
Do you know how we can also add a: if tweet have less than "x" RT, then don't retweet ?

Thanks for the inspiration!
that would be useful to help ignore fake giveaways!

Here you are:
in main.py scroll down to find this line for tweet in searched_tweets:
and just paste this line below it: if tweet.retweet_count>5:
make sure to add indentation before and after the above line.

in this case, the bot will only retweet if the tweet has more than 5 retweets.

Amazing !
I'm not really good with python, I don't really know how Im suppose to do the indentation.
Can you show me a screenshot of the code or can you write it down here ?
Thank you a lot for the help :)

Amazing !
I'm not really good with python, I don't really know how Im suppose to do the indentation.
Can you show me a screenshot of the code or can you write it down here ?
Thank you a lot for the help :)

indentation means just press "tab" on your keyboard after the if statement
for example: if you write this

if tweet.retweet_count>5:
if not any(y in tweet.text.lower().split() for y in config.skip_retweet_tags):

the code wont work.
instead you just shift the code after the first line by pressing "tab" like this:

if tweet.retweet_count>5:
      if not any(y in tweet.text.lower().split() for y in config.skip_retweet_tags):

Thank you a lotfor your help !