Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Riotcoke123/communitieswin_downvotebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Communities.win Down Vote Bot

This is a Python script using Selenium to automatically downvote posts on communities.win subreddits that have downvoting enabled.

Prerequisites

  • Python 3.6 or higher
  • pip (Python package installer)

Installation

  1. Clone the repository (if you have it):
    git clone https://github.com/Riotcoke123/communitieswin_downvotebot.git
  2. Navigate to the project directory:
    cd communitieswin_downvotebot
  3. Install the required Python libraries:
    pip install selenium webdriver-manager

Setup

Before running the script, you need to configure your bot account credentials:

  1. Go to https://communities.win/ and sign up for a new account.
  2. Use a separate account specifically for bot activity — this is recommended to avoid any issues with your main account.
  3. After signing up, open the Python script (likely named main.py or downvoter.py) in a text editor.
  4. Locate the following lines and replace them with your actual credentials:
    USERNAME = 'YOUR_USERNAME'
    PASSWORD = 'YOUR_PASSWORD'

Optional but Recommended: Add your Scored.co API key to the script if you want improved access to site functionality or plan to scale usage.

Usage

To run the script on a specific communities.win subreddit (with downvoting enabled), modify the URL variable in the Python script before execution. For example, to target the /c/funny/new subreddit:

  1. Open the Python script in a text editor.
  2. Locate the URL variable:
    URL = "https://communities.win/c/funny/new"
  3. Change the URL to the desired communities.win subreddit.
  4. Execute the script from your terminal:
    python your_script_name.py

Replace your_script_name.py with the actual name of the Python file.

Description of the Code

The Python script performs the following actions:

  1. Imports necessary libraries from Selenium for browser automation, logging for status updates, and time for delays.
  2. Defines variables for your username, password, the target URL, and CSS selectors for various elements on the page (login button, username/password fields, submit button, and downvote buttons).
  3. Configures basic logging to display information and potential errors during the script execution.
  4. Sets up Chrome browser options, including maximizing the window, disabling extensions and GPU, running in a sandbox, and setting a user agent.
  5. Initializes a Chrome WebDriver using webdriver-manager to automatically handle ChromeDriver installation.
  6. Creates a WebDriverWait instance to wait for specific elements to become interactable.
  7. Opens the specified URL in the Chrome browser.
  8. Locates and clicks the login button.
  9. Finds the username and password input fields, enters your provided credentials, and clicks the submit button.
  10. Pauses for a few seconds to allow the login process to complete.
  11. Locates all the downvote buttons on the page using their CSS selector.
  12. Iterates through the found downvote buttons and attempts to click each one, with a small delay between clicks. Any errors during the click are logged as warnings.
  13. Includes error handling to catch and log any exceptions that occur during the process.
  14. Finally, closes the browser window.

Disclaimer

Use this script responsibly and ethically. Automating interactions on websites may violate their terms of service. The author is not responsible for any consequences resulting from the use of this script.

License

This project is licensed under the GNU General Public License v3.0.

Releases

No releases published

Packages

No packages published

Languages