question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignore adult tweets [Solved]!

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
MisterWapakcommented, Dec 19, 2020

Thank you a lotfor your help !

2reactions
MisterWapakcommented, Dec 19, 2020

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 ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Age-restricted tweets #419 - JustAnotherArchivist/snscrape
You can view the tweet as long as you're signed into an account (even a suspended one, meaning you can view them with...
Read more >
Sensitive media policy - Twitter Help Center
For this reason, you can't include violent, hateful, or adult content within areas that are highly visible on Twitter, including in live video,...
Read more >
How to view sensitive content in Twitter on iPhone, iPad, and ...
Disable sensitive content warning for your own Tweets · Open the Twitter app on your iPhone. · Tap your Profile Picture at the...
Read more >
How to mute Twitter notifications from people who don't follow ...
Go to the "Settings and privacy" menu · Click “Privacy and safety” · Click “Mute and block,” then click “Muted notifications” · Check...
Read more >
6 parental instructions on how to filter content on Twitter and ...
3 proven ways for parents to block adult sites in Windows 10 ... Many parents us this feature for the solution of how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found