🎬 yt_streams
Advanced multi-platform video streaming automation with stealth capabilities, proxy management, and real-time monitoring.
yt_streams is a powerful Python framework for automated video streaming across multiple platforms including YouTube, Twitch, Vimeo, Dailymotion, and generic video URLs. Built with Playwright for robust browser automation, it features advanced stealth measures, proxy chain management, and a comprehensive Streamlit web interface.
✨ Features
🎯 Universal Platform Support
- YouTube - Full stealth mode with anti-detection
- Twitch - Live streaming support with chat interaction
- Vimeo - Professional video platform integration
- Dailymotion - Alternative video platform support
- Generic URLs - Any HTML5 video content
🥷 Advanced Stealth System
- User Agent Rotation - Dynamic browser fingerprinting
- Viewport Randomization - Randomized screen resolutions
- JavaScript Injection - Anti-automation detection bypass
- Stealth Headers - Mimic real browser behavior
- Human-like Delays - Randomized interaction timing
🔗 Proxy Chain Management
- Multi-Proxy Support - Chain multiple proxy servers
- Health Monitoring - Automatic proxy health checks
- Failover System - Seamless proxy switching
- Authentication - Support for authenticated proxies
- Performance Metrics - Real-time proxy statistics
🎮 Multi-Browser Coordination
- Thread-Safe Workers - Concurrent browser instances
- Async Coordination - Non-blocking operations
- Resource Management - Efficient memory and CPU usage
- Error Recovery - Automatic retry and recovery
- Real-time Monitoring - Live status updates
📊 Streamlit Web Interface
- Real-time Dashboard - Live monitoring and control
- Worker Management - Start/stop browser instances
- Analytics - Performance metrics and statistics
- Configuration - Dynamic settings adjustment
- Scheduling - Automated task scheduling
🛡️ Security & Compliance
- Robots.txt Compliance - Respect platform policies
- Rate Limiting - Prevent API abuse
- Secure Credentials - Environment variable handling
- TLS/SSL - Encrypted communications
- Audit Logging - Comprehensive activity tracking
🚀 Quick Start
Installation
# Install with PDM (recommended)
pip install pdm
pdm install yt_streams
# Or install with pip
pip install yt_streams
Basic Usage
from yt_streams import PoolController, BrowserOptions
# Create browser options with stealth
options = BrowserOptions(
headless=False,
stealth=True,
random_user_agent=True
)
# Create controller
controller = PoolController(
url="https://www.youtube.com/watch?v=dQw4w9WgXcQ",
workers=3,
browser=options
)
# Start and control
controller.start()
controller.broadcast(Command(play_seconds=30))
controller.stop()
Streamlit Dashboard
# Start the web interface
yt-streams serve-streamlit --workers 5 --no-headless --stealth
Access the dashboard at: http://localhost:8502
📖 Documentation
📚 Comprehensive Guides
- Installation Guide - Setup and configuration
- Usage Guide - Basic and advanced usage
- API Reference - Complete API documentation
- Configuration - Settings and options
- Examples - Code examples and tutorials
🔧 Development Resources
- Contributing Guide - How to contribute
- Security Policy - Security guidelines
- Release Notes - Version history
- Code of Conduct - Community guidelines
🎯 Use Cases
📺 Content Management
- Automated video monitoring
- Content quality assurance
- View count optimization
- Engagement tracking
🔬 Research & Analytics
- Platform behavior analysis
- User interaction studies
- Performance benchmarking
- A/B testing automation
🛠️ Development & Testing
- Web application testing
- Browser compatibility testing
- Performance monitoring
- Load testing scenarios
🎪 Entertainment & Events
- Live stream management
- Event broadcasting
- Content distribution
- Audience engagement
🏗️ Architecture
graph TB
A[Streamlit UI] --> B[PoolController]
B --> C[Worker 1]
B --> D[Worker 2]
B --> E[Worker N]
C --> F[Playwright Browser]
D --> G[Playwright Browser]
E --> H[Playwright Browser]
F --> I[Stealth System]
G --> I
H --> I
I --> J[Proxy Manager]
J --> K[Proxy Chain]
B --> L[URL Handler]
L --> M[Platform Detection]
B --> N[Storage System]
N --> O[CSV/Parquet]
🔧 Configuration
Environment Variables
# Basic configuration
export YT_STREAMS_DATA_DIR="/path/to/data"
export YT_STREAMS_DEFAULT_URL="https://example.com/video"
export YT_STREAMS_WORKERS=3
export YT_STREAMS_HEADLESS=true
export YT_STREAMS_STEALTH=true
# Proxy configuration
export YT_STREAMS_PROXY="http://proxy:8080"
export YT_STREAMS_PROXY_CHAIN="http://proxy1:8080,http://proxy2:3128"
# Security settings
export YT_STREAMS_SECURE_MODE=true
export YT_STREAMS_VALIDATE_CERTIFICATES=true
Configuration File
{
"stealth": {
"random_viewport": true,
"random_user_agent": true,
"disable_images": false,
"human_like_delays": true
},
"proxy": {
"enabled": true,
"chain": [
{
"host": "proxy1.example.com",
"port": 8080,
"protocol": "http"
}
]
}
}
🧪 Testing
Test Suite
# Run all tests
make test
# Run specific test types
make test-unit # Unit tests
make test-e2e # End-to-end tests
make test-stealth # Stealth functionality
make test-coverage # With coverage report
Test Results
- Unit Tests: 95%+ coverage
- Integration Tests: All major workflows
- End-to-End Tests: Complete user scenarios
- Performance Tests: Load and stress testing
🚀 Performance
Benchmarks
- Browser Launch: < 2 seconds
- Page Load: < 3 seconds
- Stealth Application: < 1 second
- Memory Usage: < 100MB per worker
- CPU Usage: < 10% per worker
Optimization Features
- Connection Pooling - Reuse HTTP connections
- Resource Caching - Cache frequently used data
- Lazy Loading - Load components on demand
- Async Operations - Non-blocking I/O
- Memory Management - Automatic cleanup
🔒 Security
Security Features
- Anti-Detection - Advanced stealth measures
- Secure Communication - TLS/SSL encryption
- Credential Protection - Environment variable handling
- Rate Limiting - Prevent abuse
- Audit Logging - Comprehensive tracking
Best Practices
- Use environment variables for sensitive data
- Regularly update dependencies
- Monitor for security advisories
- Follow platform terms of service
- Respect rate limits and robots.txt
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Quick Contribution Steps
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Development Setup
# Clone and setup
git clone https://github.com/your-username/yt_streams.git
cd yt_streams
pdm install -G dev
# Run tests
make test
# Build documentation
make docs-build
📊 Project Status
Current Version: 0.1.0
- ✅ Core Features - Complete
- ✅ Stealth System - Complete
- ✅ Proxy Management - Complete
- ✅ Web Interface - Complete
- ✅ Documentation - Complete
- ✅ Testing - 95%+ coverage
- ✅ CI/CD - Automated workflows
Roadmap
- 🔄 v0.2.0 - Enhanced stealth features
- 🔄 v0.3.0 - Additional platform support
- 🔄 v0.4.0 - Advanced analytics
- 🔄 v1.0.0 - Production ready
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Playwright - Browser automation framework
- Streamlit - Web interface framework
- PDM - Python dependency management
- Sphinx - Documentation generation
- Contributors - All who help improve this project
📞 Support
Getting Help
- Documentation: Full Documentation
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Security: Security Policy
Community
- Contributing: Contributing Guide
- Code of Conduct: Community Guidelines
- Changelog: Release Notes
Metadata
Release files for yt-streams 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yt_streams-0.1.0.tar.gz | 90.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yt_streams-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 187.4 kB
Release files / yt_streams-0.1.0.tar.gz
| Download URL | yt_streams-0.1.0.tar.gz |
|---|---|
| Size | 90.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1d2501db5ef2eacb72a3dd9645b5ed2cfcbfd85d16643dd5b5ce6dfbbdde860
|
|
BLAKE2b-256 checksum How to use checksums |
058cef66a269162d3c2f0b344f980633a9f06c2e756c2b55cacb96a20d30736b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|
Release files / yt_streams-0.1.0-py3-none-any.whl
| Download URL | yt_streams-0.1.0-py3-none-any.whl |
|---|---|
| Size | 97.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00da7479db93de380e59141e8c55aac81d929a3c48756bd34c81baff683b7cbc
|
|
BLAKE2b-256 checksum How to use checksums |
d55c132904dcc2cad53446861fd9121ff56c035a9b8e553d8c1da57a30733890
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|