Author

Topic: [ANN]Self Moderator Bot (Read 552 times)

copper member
Activity: 1610
Merit: 1898
Amazon Prime Member #7
February 14, 2022, 01:08:39 PM
#6

If anyone is posting nonsense in your self mod thread and is refusing to refrain from posting, this tool is for you!
copper member
Activity: 1610
Merit: 1898
Amazon Prime Member #7
December 19, 2019, 10:45:41 AM
#5
Congratulations, I think you have your first customer - it seems that Bitcoin SV put your bot to good use:

https://bitcointalksearch.org/topic/m.53385641
Someone in the BSV team is surly capable of writing this code (the code is not complicated). You have even been banned from self moderated threads before.

The current forum rules already allow for OPs if self moderated threads to effectively do what my bot does. If they are scamming, you should open a scam accusation, if one doesn’t exist for the particular scam.

Furthermore, I doubt either the presence or absence of the posts in question are going to change anyone’s mind regarding that shit-coin.

I am a firm believer of equal access, opportunity and knowledge for everyone. I will keep up the code.

I have also received messages from others about my code who appeared interested in using the code.
legendary
Activity: 3612
Merit: 8904
https://bpip.org
December 19, 2019, 10:15:13 AM
#4
Congratulations, I think you have your first customer - it seems that Bitcoin SV put your bot to good use:

https://bitcointalksearch.org/topic/m.53385641
copper member
Activity: 1610
Merit: 1898
Amazon Prime Member #7
December 15, 2019, 05:12:47 PM
#3
#enter how frequently you wish to review your thread for banned posters, in seconds, minimum 1
frequency = 10
If many users start using this bot, it's going to cause a lot of page loads. If that becomes too much, a centralized api that scrapes all posts (like I do here, but I don't have an api) might be needed to prevent unneccessary scraping. It's very easy to know if a certain user posted in a certain thread, without (eventually) scraping hundreds of different threads.
I don't foresee this being a terrible strain on forum resources, even with heavy usage. I am not familiar with how DDoS attacks work, but I have read that they can send many gigabits of data/second to a website's network. If bot users checked their thread at a rate of once per every 10 seconds, it would take approximately 5,000 threads being moderated with the bot in order to cause the forum to send 1 GB every second.

An API would overall consume less resources because less data would need to be sent to each user. However it would require a lot more work, and other resources to setup. It would probably also require some ongoing maintenance. I might put something like this on my to-do list.
legendary
Activity: 3262
Merit: 16303
Thick-Skinned Gang Leader and Golden Feather 2021
December 15, 2019, 04:58:14 AM
#2
I haven't tested it, but I can see how this can be useful Smiley

however by using my bot, or by using any bot derived from my bot, you are agreeing and promising that you will not take steps to prevent the subject of your self-moderated thread from posting in your thread. In other words, if you are using my bot, you must allow any person who is the subject of your self-moderated thread to respond to your thread.
Fair enough Smiley

#enter how frequently you wish to review your thread for banned posters, in seconds, minimum 1
frequency = 10
If many users start using this bot, it's going to cause a lot of page loads. If that becomes too much, a centralized api that scrapes all posts (like I do here, but I don't have an api) might be needed to prevent unneccessary scraping. It's very easy to know if a certain user posted in a certain thread, without (eventually) scraping hundreds of different threads.
copper member
Activity: 1610
Merit: 1898
Amazon Prime Member #7
December 15, 2019, 03:12:59 AM
#1
There appears to be demand for a bot to prevent specific users from being able to post in self moderated threads.

As such, I am releasing a bot to self moderator bot that bans specific UIDs from posting in your self moderated thread.

You can run the bot by performing the following steps:
  • Install prerequisites*
  • Create text file (name cannot have spaces), and change file name extension to .py
  • Past code into text file
  • enter the captcha bypass URL, your forum username, thread you are moderating, and list of UIDs you are banning from posting in your thread into the file in their respective variables
  • If you are not using a mac, comment out line 26, and uncomment the line below the OS type you are running; save the file
  • Open terminal (or gitbash if using Windows), navigate to the folder the file is in
  • In the terminal, type python file_name.py
  • If you named the file 'self_moderator.py' you would type python self_moderator.py
  • the terminal will ask for your forum password, type your forum password and press enter
  • Note: your password will only be transmitted to the forum to login, and the code does not otherwise retain or transmit your password to anywhere else (as written)
  • If you did everything correctly, the bot will review your self moderated thread every 10 seconds (by default), and remove any posts by anyone you have banned from your thread
Prerequisites:
Python
The following python libraries: splinter bs4 (beautifulsoup) selenium numpy datetime time warnings
Chrome
Chromedriver -- you can find documentation on how to install chromedriver here.
The bot was tested using version 3.7 of python, and I am unsure if it will work on older versions

If you don't want Chrome to display in the backgroud while your bot is running, you can change line 48, specifically the variable 'headless' from False to True

My bot has a MIT license, however by using my bot, or by using any bot derived from my bot, you are agreeing and promising that you will not take steps to prevent the subject of your self-moderated thread from posting in your thread. In other words, if you are using my bot, you must allow any person who is the subject of your self-moderated thread to respond to your thread.

I have posted my code on github and is below:
Code:
Cloud Flare appears to be preventing me from posting my code here

Comments and suggestions for improvements are welcomed.

If there is demand, I could add functionality to also prevent ranks, or those with under certain activity or merit from posting.
Jump to: