Judol Slayer.

JavaScript

Remove spam 'judol' comments from YouTube videos

Last updated: 5 days ago

Overview

Judol Slayer is a tool to automatically scan and remove spam β€œjudol” comments from YouTube videos.
It uses the YouTube Data API v3 and requires Google OAuth credentials to work.


Installation

πŸ“Ί Technical explanation video

Step 1: Install Node.js

  1. Visit https://nodejs.org/

  2. Download the LTS version (recommended)

  3. Install as usual (Next β†’ Next β†’ Finish)

  4. Verify installation:

    node -v
    npm -v
    

Step 2: Install Visual Studio Code

  1. Visit https://code.visualstudio.com/
  2. Download and install VS Code
  3. Open the application

Step 3: Create a Project Folder

  1. In VS Code: File β†’ Open Folder β†’ create a new folder (e.g., YouTubeSpamRemover)
  2. Inside it, create a file named index.js

Step 4: Enable YouTube Data API & Create OAuth Client ID

  1. Go to Google Cloud Console
  2. Create a new project (or select an existing one)
  3. Enable YouTube Data API v3:
    • API & Services β†’ Library
    • Search for YouTube Data API v3 β†’ Enable
  4. Create OAuth credentials:
    • API & Services β†’ Credentials
    • Create Credentials β†’ OAuth client ID
    • Choose Desktop App
    • Download credentials.json and save it in your project folder

Step 5: Open Terminal in VS Code

npm init -y

Step 6: Install Required Libraries

npm install googleapis dotenv

Step 7: Prepare Project Files

Your project folder should now contain:

  • credentials.json (from Google Cloud Console, rename if necessary)

  • .env file with the following content:

    YOUTUBE_CHANNEL_ID=your_channel_id
    

[!IMPORTANT]
Find your channel ID here: YouTube Advanced Settings

Step 8: Add the Code

Paste the full JavaScript code into index.js.

Step 9: Run the Program

node index.js
  1. The terminal will display a URL β€” open it in your browser
  2. Log in with your YouTube account and grant access
  3. Copy the code from the redirect URL
  4. Paste it into the terminal
  5. The program will scan and delete spam comments automatically πŸš€

Notes

  • On the first run, a token.json file will be created. As long as it exists and is valid, you won’t need to log in again.
  • YouTube Data API v3 has a daily quota of 10,000 units. Once exhausted, the program cannot delete comments until the next day.