Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you add a ban keyword option ? #6

Open
MisterWapak opened this issue Oct 26, 2019 · 14 comments
Open

Can you add a ban keyword option ? #6

MisterWapak opened this issue Oct 26, 2019 · 14 comments

Comments

@MisterWapak
Copy link

Hello, i love this progam, he work perfectly bu i think you miss 1 option: a ban keyword option. Its could be great because I don't like that my bot RT and follow giveway of nude pics...
You can also add a minimum RT count before RT a giveway, that could be great improve
If you have time to do that, it will be awesome !
Thanks for your good work, bye :)

@ItsOmarKhater
Copy link
Contributor

I just started using it a couple of days ago, you seem to have been using this bot for while :D
I'm just curious did you win any giveaways?

@MisterWapak
Copy link
Author

Oh yes, I use it for like 2 years now lol
I won a lot of things (T-shirt, games on steam, lots and lots of nudes that I don't want :s). Just be sure to set the time of rt per sec at a minimum of 60 sec if you don't want to have your account banned (i have like 3 account ban in 2 years lol).

@ItsOmarKhater
Copy link
Contributor

I've updated the previous ban keyword code. Now you don't have to include every single variation of a word in the ban list, cuz the bot was treating "nude" and "nudes" as different words. that's fixed in the following code which works way better:
in main.py scroll down to find this line for tweet in searched_tweets:
and just paste this code below it:
adult= False for BadWord in config.skip_retweet_tags: if (tweet.text.lower().find(BadWord) != -1): #if bad word from skip_retweet_tags was found in a tweet adult = True # retweet count and date if tweet.retweet_count>15: #only retweet if retweet count is more than 15 retweets if not (adult): #if tweet doesn't include bad words proceed

make sure to add indentation after the above code.

in config.py
before the retweet_tags list
add this list skip_retweet_tags = ["nude","tits" ,"booty" ,"boobs", "cum"] you can add the words that you want the bot to skip them.

@disestevez
Copy link
Collaborator

@OmarAshraf2030 if you make a fork, update the code there, and send me the link maybe i can add it to the official repo

@ItsOmarKhater
Copy link
Contributor

@OmarAshraf2030 if you make a fork, update the code there, and send me the link maybe i can add it to the official repo

I'm new to GitHub 😁, I'll see how to do that fork thing :)

@disestevez
Copy link
Collaborator

hah no problem. this might help: https://guides.github.com/activities/forking

@The-Great-One
Copy link

tweet
Is this how the indentation is supposed to be??

@OmarAshraf2030 if you make a fork, update the code there, and send me the link maybe i can add it to the official repo

I'm new to GitHub , I'll see how to do that fork thing :)

@ItsOmarKhater
Copy link
Contributor

@OmarAshraf2030 if you make a fork, update the code there, and send me the link maybe i can add it to the official repo

Here's my fork 😃
https://github.com/ItsOmarKhater/Twitter-Giveaways-Bot
What's new?

  • Added ban keyword list (ignore tweets that contain certain keywords)
  • Don't retweet tweets that have a few numbers of retweets (to avoid retweeting fake giveaways)
  • Don't retweet old tweets (you can set the bot to ignore tweets that are older than 30 days for example)

@ItsOmarKhater
Copy link
Contributor

tweet
Is this how the indentation is supposed to be??

@OmarAshraf2030 if you make a fork, update the code there, and send me the link maybe i can add it to the official repo

I'm new to GitHub , I'll see how to do that fork thing :)

Sorry for the late reply! I've added the changes in my fork.

@MisterWapak
Copy link
Author

Hello again,
I tried your code and the cmd say when I run it: "Global Name 'datetime' is not defined"
I don't know if I'm doing something wrong. Hope you can help me :)

@ItsOmarKhater
Copy link
Contributor

ItsOmarKhater commented Dec 26, 2020

Hello again,
I tried your code and the cmd say when I run it: "Global Name 'datetime' is not defined"
I don't know if I'm doing something wrong. Hope you can help me :)

I forgot to import datetime 😅
in main.py
add this line from datetime import datetime, timezone

@The-Great-One
Copy link

Hello again,
I tried your code and the cmd say when I run it: "Global Name 'datetime' is not defined"
I don't know if I'm doing something wrong. Hope you can help me :)

I forgot to import datetime sweat_smile
in main.py
add this line from datetime import datetime, timezone

I think there is still some indentation error at line 60. Can you please check?

@ItsOmarKhater
Copy link
Contributor

I think there is still some indentation error at line 60. Can you please check?

Thanks for pointing this out!
I fixed it, try it now and tell me if it's working properly!

@maconeedshelp
Copy link

Is this bot still working?
I am doing something wrong but i dont know what, it just closes instantly when i am opening it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants