Judolslayer
AI-powered tool to automatically detect and remove online gambling comments on YouTube videos.
Install / Use
/learn @YourWisemaker/JudolslayerREADME
YouTube Spam Comment Remover
Sebuah alat bertenaga AI untuk mendeteksi dan menghapus komentar spam dari video YouTube menggunakan Gemini AI, dibangun dengan backend Flask dan frontend Next.js.
🚀 Memulai Cepat
-
Clone repository:
git clone <repository-url> cd judolslayer -
Setup backend (lihat Setup Backend)
-
Setup frontend (lihat Setup Frontend)
-
Konfigurasi API keys di file environment
-
Jalankan kedua server dan kunjungi
http://localhost:3000
Fitur
- 🤖 Deteksi Bertenaga AI: Menggunakan Gemini AI Google (gemini-2.0-flash) untuk deteksi spam yang cerdas
- 🎯 Filter Lanjutan: Mendeteksi judi, penipuan, promosi, dan jenis spam lainnya
- 🔍 Mode Dry Run: Preview apa yang akan dihapus sebelum mengambil tindakan
- 📊 Analitik Detail: Lihat statistik dan analisis komprehensif
- 🚀 UI Modern: Interface yang indah dan responsif dibangun dengan Next.js dan Tailwind CSS
- 🔄 Pemrosesan Batch: Proses beberapa video sekaligus
- 📤 Ekspor Hasil: Download hasil analisis sebagai JSON atau CSV
- ⚡ Pemrosesan Real-time: Update langsung selama pemrosesan
Perbandingan Mode Operasi
| Fitur | Mode Analisis/Dry Run | Mode Hapus | |-------|----------------------|------------| | Tujuan | Preview dan analisis | Hapus spam aktual | | Keamanan | ✅ Aman, tidak ada perubahan | ⚠️ Permanen, tidak bisa dibatalkan | | Output | Laporan deteksi spam | Komentar spam dihapus | | Rekomendasi | Selalu gunakan dulu | Gunakan setelah review | | Risiko | Tidak ada risiko | Risiko hapus komentar valid | | Fungsi | Identifikasi dan statistik | Moderasi aktual | | Reversible | ✅ Ya (tidak ada aksi) | ❌ Tidak (penghapusan permanen) | | Ideal untuk | Testing, review, analisis | Pembersihan final |
Arsitektur
Backend (Flask + LangGraph)
- Flask: Server API RESTful
- LangGraph: Orkestrasi workflow untuk logika deteksi spam yang kompleks
- Gemini AI: Model bahasa canggih untuk klasifikasi spam
- YouTube Data API: Mengambil dan mengelola komentar
- TensorFlow/PyTorch: Kemampuan ML tambahan (dapat diperluas)
Frontend (Next.js)
- Next.js 14: Framework React dengan App Router
- TypeScript: Pengembangan yang type-safe
- Tailwind CSS: Styling utility-first
- React Query: Pengambilan data dan caching
- React Hook Form: Manajemen form dengan validasi
- Heroicons: Ikon yang indah
Prasyarat
- Python 3.8+ dengan pip
- Node.js 18+ dengan npm
- YouTube Data API v3 key dari Google Cloud Console
- Google AI (Gemini) API key dari Google AI Studio
- Git untuk version control
Mendapatkan API Keys
-
YouTube Data API v3:
- Kunjungi Google Cloud Console
- Buat project baru atau pilih yang sudah ada
- Aktifkan YouTube Data API v3
- Buat credentials (API key)
- Batasi key untuk YouTube Data API v3 demi keamanan
-
Google AI (Gemini) API:
- Kunjungi Google AI Studio
- Masuk dengan akun Google Anda
- Buat API key baru
- Salin key untuk digunakan di file environment Anda
Instalasi
Setup Backend
- Navigasi ke direktori backend:
cd backend
- Buat virtual environment:
python -m venv venv
source venv/bin/activate # Di Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Buat file environment:
cp .env.example .env
- Konfigurasi file
.envAnda:
# API Keys (Required)
YOUTUBE_API_KEY=your_youtube_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here
# Flask Configuration
FLASK_ENV=development
FLASK_DEBUG=True
SECRET_KEY=generated_secure_secret_key_here
# CORS Settings
CORS_ORIGINS=http://localhost:3000
# Rate Limiting
RATE_LIMIT_PER_MINUTE=60
# Logging
LOG_LEVEL=INFO
Penting:
- Ganti
your_youtube_api_key_heredengan YouTube Data API v3 key Anda yang sebenarnya - Ganti
your_gemini_api_key_heredengan Google AI (Gemini) API key Anda yang sebenarnya - SECRET_KEY telah dibuat secara otomatis untuk keamanan
- Jangan pernah commit file
.envAnda ke version control
- Jalankan aplikasi Flask:
python app.py
Backend akan tersedia di http://localhost:5000
Setup Frontend
- Navigasi ke direktori frontend:
cd frontend
- Install dependencies:
npm install
- Buat file environment:
cp .env.local.example .env.local
- Konfigurasi file
.env.localAnda:
NEXT_PUBLIC_API_URL=http://localhost:5000
- Jalankan development server:
npm run dev
Frontend akan tersedia di http://localhost:3000
API Endpoints
Backend API
GET /api/health- Health checkPOST /api/process-video- Proses video untuk deteksi spamPOST /api/analyze-comment- Analisis satu komentarPOST /api/video-info- Dapatkan informasi videoPOST /api/batch-process- Proses beberapa video
Catatan: Semua API keys sekarang dikonfigurasi melalui environment variables untuk keamanan yang lebih baik. Tidak perlu menyertakannya dalam request API.
Contoh Request
Proses Video untuk Deteksi Spam
curl -X POST http://localhost:5000/api/process-video \
-H "Content-Type: application/json" \
-d '{
"video_id": "dQw4w9WgXcQ",
"max_results": 100,
"dry_run": true
}'
Analisis Satu Komentar
curl -X POST http://localhost:5000/api/analyze-comment \
-H "Content-Type: application/json" \
-d '{
"comment_text": "Check out my crypto trading bot!"
}'
Penggunaan
-
Jalankan Aplikasi:
- Pastikan server backend dan frontend berjalan
- Buka
http://localhost:3000di browser Anda
-
Masukkan Informasi Video:
- Paste YouTube video ID atau URL lengkap
- Konfigurasi pengaturan deteksi (API keys dimuat otomatis dari environment)
- Sesuaikan opsi lanjutan jika diperlukan
-
Jalankan Analisis:
- Direkomendasikan: Gunakan "Dry Run" dulu untuk preview hasil tanpa membuat perubahan
- Review analisis dan statistik
- Jika puas, nonaktifkan "Dry Run" dan klik "Remove Spam" untuk menghapus komentar spam yang terdeteksi
-
Review Hasil:
- Lihat statistik detail dan skor confidence
- Filter komentar berdasarkan tipe (All, Spam, Clean)
- Urutkan berdasarkan confidence, tanggal, atau level risiko
- Ekspor hasil untuk analisis lebih lanjut
⚠️ Catatan Penting
- Selalu test dengan Dry Run dulu untuk menghindari penghapusan komentar yang sah secara tidak sengaja
- Penghapusan spam bersifat permanen - komentar yang dihapus tidak dapat dipulihkan
- Rate limits berlaku - YouTube API memiliki kuota harian
- Review hasil dengan hati-hati - deteksi AI mungkin memiliki false positives
Konfigurasi
Pengaturan Deteksi Spam
- Confidence Threshold: Level confidence minimum untuk klasifikasi spam (0.0-1.0)
- Risk Levels: Kategorisasi risiko Tinggi, Sedang, Rendah
- Spam Types: Judi, Penipuan, Promosi, Ofensif, dll.
- Dry Run: Mode preview tanpa penghapusan aktual
Opsi Lanjutan
- Max Comments: Batasi jumlah komentar yang diproses
- Include Replies: Proses balasan komentar
- Custom Patterns: Tambahkan pola deteksi spam kustom
- Batch Processing: Proses beberapa video secara bersamaan
Development
Backend Development
# Jalankan dengan auto-reload
python app.py
# Jalankan tests (jika file test ada)
python -m pytest tests/
# Format code (install tools dulu: pip install black flake8)
black .
flake8 .
Frontend Development
# Development server
npm run dev
# Build untuk production
npm run build
# Jalankan production server
npm start
# Lint code
npm run lint
# Type check
npm run type-check
Deployment
Backend (Flask)
- Menggunakan Gunicorn:
gunicorn -w 4 -b 0.0.0.0:5000 app:app
- Menggunakan Docker:
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 5000
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:app"]
Frontend (Next.js)
- Static Export:
npm run build
npm run export
- Vercel Deployment:
npm install -g vercel
vercel
Pertimbangan Keamanan
- API Keys:
- Semua API keys dikelola melalui environment variables
- Jangan pernah commit file
.envke version control - Gunakan
.env.examplesebagai template untuk variabel yang diperlukan credentials.jsonsecara otomatis diabaikan oleh Git
- Secret Key: Generate Flask secret key yang aman untuk production
- Rate Limiting: Implementasikan rate limiting yang tepat untuk production
- CORS: Konfigurasi CORS dengan benar untuk domain Anda
- Input Validation: Semua input divalidasi dan disanitasi
- Error Handling: Error handling dan logging yang komprehensif
- Git Security:
- File
.gitignoreyang komprehensif melindungi data sensitif - OAuth credentials dan API keys dikecualikan dari version control
- Jika Anda tidak sengaja commit file sensitif, hapus dari Git history
- File
Kontribusi
- Fork repository
- Buat feature branch
- Buat perubahan Anda
- Tambahkan tests jika diperlukan
- Submit pull request
Lisensi
MIT License - lihat file LICENSE untuk detail
Support
Untuk issues dan pertanyaan:
- Buat issue di GitHub
- Periksa dokumentasi
- Review contoh API
Troubleshooting
Masalah Umum
-
Error "API key not found":
- Pastikan file
.envada di direktori backend - Periksa bahwa API keys sudah diset dengan benar di environment variables
- Restart server backend setelah mengubah environment variables
- Pastikan file
-
Error "Video not found":
- Verifikasi YouTube video ID atau URL sudah benar
- Pastikan video bersifat public
Related Skills
qqbot-channel
349.2kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
100.3k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
349.2kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
arscontexta
3.0kClaude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.
