A sophisticated bot that simulates multiple viewers watching your YouTube live streams, designed for 24/7 operation on cloud hosting platforms.
- Multiple Concurrent Viewers: Support for 1-50+ simultaneous viewers
- Realistic Behavior: Human-like interactions (scrolling, pausing, volume changes)
- Anti-Detection: Separate browser profiles, staggered timing, varied user agents
- Auto-Recovery: Automatic restarts and error handling
- 24/7 Operation: Designed for continuous hosting
- Easy Deployment: Ready for Render, Railway, Heroku, and Docker
- Fork this repository
- Connect to Render:
- Go to render.com
- Connect your GitHub account
- Select this repository
- Configure Environment Variables:
STREAM_URL: Your YouTube live stream URLVIEWER_COUNT: Number of viewers (start with 3-5 for free tier)RESTART_INTERVAL_HOURS: How often to restart (4-6 hours)
- Deploy: Click "Create Web Service"
| Variable | Description | Default | Example |
|---|---|---|---|
STREAM_URL |
Your YouTube live stream URL | Required | https://www.youtube.com/watch?v=abc123 |
VIEWER_COUNT |
Number of concurrent viewers | 5 | 10 |
MAX_DURATION_MINUTES |
Max session duration (0=unlimited) | 0 | 360 |
RESTART_INTERVAL_HOURS |
Hours between restarts | 6 | 4 |
| Viewers | RAM | CPU | Recommended Plan |
|---|---|---|---|
| 1-5 | 512MB | 0.1 CPU | Render Free |
| 6-15 | 1GB | 0.5 CPU | Render Starter ($7/mo) |
| 16-30 | 2GB | 1.0 CPU | Render Standard ($25/mo) |
| 31-50 | 4GB | 2.0 CPU | Render Pro ($85/mo) |
- Python 3.9+
- Chrome browser
git clone https://github.com/yourusername/youtube-viewer-bot.git
cd youtube-viewer-bot
pip install -r requirements.txtcp config.env .env
# Edit .env with your stream URLpython main.pyfrom youtube_viewer import YouTubeViewer
viewer = YouTubeViewer()
await viewer.setup_browser()
await viewer.watch_video("https://www.youtube.com/watch?v=VIDEO_ID")from live_stream_viewer import MultiViewerManager
manager = MultiViewerManager()
await manager.create_viewers(
count=10,
stream_url="https://www.youtube.com/watch?v=STREAM_ID",
max_duration_minutes=60
)python manage_profiles.pypython test_viewers.py
python test_profiles.py- ✅ Free tier: 750 hours/month
- ✅ Automatic deployments
- ✅ Chrome support
- ✅ Easy setup
- ✅ $5/month hobby plan
- ✅ Excellent performance
- ✅ Simple deployment
- ✅ Reliable platform
- ❌ No free tier
- ✅ Chrome buildpack available
docker-compose up -dThe bot provides detailed logging:
- Viewer connection status
- Stream availability checks
- Error handling and recovery
- Performance metrics
Check logs in your hosting platform's dashboard or viewer_bot.log locally.
- Use responsibly within YouTube's Terms of Service
- Don't abuse with excessive viewer counts
- Consider impact on content creators and platform
- Uses multiple anti-detection techniques
- Separate browser profiles for each viewer
- Realistic human behavior simulation
- Staggered timing and varied patterns
- Start with fewer viewers (3-5) and scale up
- Monitor resource usage on your hosting platform
- Use restart intervals to prevent memory leaks
- Check YouTube Studio for accurate analytics
"Chrome can't read profile directory"
- Solution: Bot automatically uses temp directories on hosting platforms
"Stream not found"
- Verify your STREAM_URL is correct
- Ensure the stream is actually live
Low viewer count showing
- YouTube viewer count updates every 1-2 minutes
- Check YouTube Studio Analytics for accurate data
- Some fluctuation is normal
Memory/Resource issues
- Reduce VIEWER_COUNT
- Increase RESTART_INTERVAL_HOURS
- Upgrade hosting plan
If you encounter issues:
- Check the application logs
- Verify your configuration
- Test with fewer viewers
- Ensure your stream is live
- Check hosting platform status
This project is for educational purposes. Use responsibly and in accordance with YouTube's Terms of Service.
Contributions are welcome! Please feel free to submit a Pull Request.
⭐ Star this repository if it helped you!