Bitcoin Forum
May 05, 2024, 06:44:08 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN]Self Moderator Bot  (Read 556 times)
PrimeNumber7 (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
December 15, 2019, 07:12:59 AM
Last edit: December 15, 2019, 08:43:07 AM by PrimeNumber7
Merited by LoyceV (10), Welsh (10), ABCbits (10), Blacknavy (10), vapourminer (9), malevolent (8), Halab (4), bones261 (4), Dabs (3), Pmalek (3), BitcoinGirl.Club (2), hugeblack (2), DireWolfM14 (2), hosseinimr93 (1), dkbit98 (1), TheBeardedBaby (1), Deathwing (1), Heisenberg_Hunter (1)
 #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.
1714934648
Hero Member
*
Offline Offline

Posts: 1714934648

View Profile Personal Message (Offline)

Ignore
1714934648
Reply with quote  #2

1714934648
Report to moderator
You get merit points when someone likes your post enough to give you some. And for every 2 merit points you receive, you can send 1 merit point to someone else!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714934648
Hero Member
*
Offline Offline

Posts: 1714934648

View Profile Personal Message (Offline)

Ignore
1714934648
Reply with quote  #2

1714934648
Report to moderator
LoyceV
Legendary
*
Offline Offline

Activity: 3304
Merit: 16599


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
December 15, 2019, 08: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.

PrimeNumber7 (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
December 15, 2019, 09:12:47 PM
Merited by Dabs (5)
 #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.
suchmoon
Legendary
*
Offline Offline

Activity: 3654
Merit: 8922


https://bpip.org


View Profile WWW
December 19, 2019, 02:15:13 PM
 #4

Congratulations, I think you have your first customer - it seems that Bitcoin SV put your bot to good use:

https://bitcointalk.org/index.php?topic=5149062.msg53385641#msg53385641
PrimeNumber7 (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
December 19, 2019, 02:45:41 PM
 #5

Congratulations, I think you have your first customer - it seems that Bitcoin SV put your bot to good use:

https://bitcointalk.org/index.php?topic=5149062.msg53385641#msg53385641
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.
PrimeNumber7 (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
February 14, 2022, 05: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!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!