├── requirements.txt ├── youtube-bot-demo.gif ├── youtube-view-bot.png ├── .env.example ├── Dockerfile ├── package.json ├── index.js ├── main.py └── README.md /requirements.txt: -------------------------------------------------------------------------------- 1 | playwright 2 | python-dotenv 3 | -------------------------------------------------------------------------------- /youtube-bot-demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/y-t-bot/youtube-view-bot/HEAD/youtube-bot-demo.gif -------------------------------------------------------------------------------- /youtube-view-bot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/y-t-bot/youtube-view-bot/HEAD/youtube-view-bot.png -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | YOUTUBE_EMAIL=your_email@gmail.com 2 | YOUTUBE_PASSWORD=your_password 3 | PROXY=http://user:pass@ip:port 4 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18 2 | 3 | WORKDIR /app 4 | 5 | COPY package.json package-lock.json* ./ 6 | RUN npm install 7 | 8 | COPY . . 9 | 10 | CMD ["npm", "start"] 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "youtube-bot", 3 | "version": "1.0.0", 4 | "description": "youtube-bot — automation toolkit", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "dependencies": { 10 | "playwright": "^1.48.0", 11 | "dotenv": "^16.4.0" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const { chromium } = require("playwright"); 2 | require("dotenv").config(); 3 | 4 | (async () => { 5 | const browser = await chromium.launch({ headless: false }); 6 | const context = await browser.newContext({ 7 | proxy: process.env.PROXY ? { server: process.env.PROXY } : undefined, 8 | }); 9 | const page = await context.newPage(); 10 | 11 | console.log("[INFO] Navigating to YouTube..."); 12 | await page.goto("https://youtube.com"); 13 | 14 | // Example action: search and play a video 15 | await page.fill("input#search", "lofi hip hop radio"); 16 | await page.keyboard.press("Enter"); 17 | await page.waitForTimeout(3000); 18 | 19 | await page.click("ytd-video-renderer a#thumbnail"); 20 | console.log("[INFO] Playing video..."); 21 | 22 | await page.waitForTimeout(15000); // watch 15s 23 | await browser.close(); 24 | })(); 25 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | from playwright.async_api import async_playwright 3 | from dotenv import load_dotenv 4 | import os 5 | 6 | load_dotenv() 7 | 8 | async def run(): 9 | async with async_playwright() as p: 10 | browser = await p.chromium.launch(headless=False) 11 | context = await browser.new_context(proxy={"server": os.getenv("PROXY")} if os.getenv("PROXY") else None) 12 | page = await context.new_page() 13 | 14 | print("[INFO] Navigating to YouTube...") 15 | await page.goto("https://youtube.com") 16 | 17 | # Example action: search and play a video 18 | await page.fill("input#search", "lofi hip hop radio") 19 | await page.keyboard.press("Enter") 20 | await page.wait_for_timeout(3000) 21 | 22 | await page.click("ytd-video-renderer a#thumbnail") 23 | print("[INFO] Playing video...") 24 | 25 | await page.wait_for_timeout(15000) # watch 15s 26 | await browser.close() 27 | 28 | asyncio.run(run()) 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # youtube-view-bot 2 | 3 | Automated solution for simulating YouTube views at scale. 4 | Designed for testing, research, and educational purposes, this toolkit helps developers understand YouTube’s behavior, proxies, and automation flows. 5 | 6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
36 |
37 |
41 |
42 |
43 |
44 |