| Feature |
Description |
| Draft Automation |
Process YouTube Studio draft videos in sequence |
| Reuse Previous Details |
Copy title, description, and settings from the previous video |
| Episode Renumbering |
Automatically update episode numbers in title and description |
| Thumbnail Upload |
Pick cover images from thumbnails/ |
| Thumbnail Generator |
Generate numbered thumbnails directly from PNG templates |
| Scheduled Publish |
Set publish date based on the previous video |
| Playlist Card Setup |
Configure end screen and playlist cards |
| Monetization Flow |
Handle monetization and ad rating settings |
| User-friendly Logs |
Emoji, colors, progress, and summary report |
| Native + Docker |
Run via bash, Makefile, or Docker |
| Layer |
Technology |
| Language |
Python 3.11+ |
| Automation |
Playwright |
| UI / CLI |
argparse, terminal logging |
| Imaging |
Pillow |
| Packaging |
venv, pip, Makefile, Docker Compose |
BITS-YouTube-Automation/
βββ main.py # CLI entry point + automation flow
βββ core/ # Core logic
β βββ config.py # Load + validate config
β βββ helpers.py # Date, file, and network-wait helpers
β βββ logger.py # Logging utility
β βββ runner.py # Draft orchestration
β βββ schedule.py # Publish schedule step
β βββ selectors.py # YouTube Studio UI selectors
β βββ studio.py # Playwright interaction abstraction
β βββ steps/ # Feature-specific steps
βββ templates/ # Thumbnail PNG templates
βββ thumbnails/ # Generated thumbnails
βββ profile/ # Browser login session
βββ logs/ # Logs and error screenshots
βββ docs/ # Setup, usage, troubleshooting
βββ tests/ # Unit tests
βββ setup.sh / run.sh # Native scripts
βββ Makefile # Developer shortcuts
βββ Dockerfile # Container image
βββ docker-compose.yml # Local container run
- Python 3.11+
- Google Chrome or Chromium
- A YouTube Studio account
git clone https://github.com/Banten-IT-Solutions/BITS-YouTube-Automation.git
cd BITS-YouTube-Automation
bash setup.sh
Log in manually in browser, then press Enter in terminal. Session is stored in profile/.
bash run.sh run 5
bash run.sh run
python main.py thumbnail --list
python main.py thumbnail risalatul-maymuniyah 135 137
python main.py thumbnail --tui
docker-compose build
docker-compose run --rm bits-youtube-automation python main.py login
docker-compose run --rm bits-youtube-automation python main.py run --limit 5
| Command |
Description |
bash setup.sh |
Set up venv, dependencies, and Chromium |
bash run.sh login |
Log in to YouTube Studio |
bash run.sh test |
Test 1 draft |
bash run.sh run [N] |
Run N drafts |
bash run.sh status |
Check setup status |
python main.py thumbnail --list |
List thumbnail templates |
python main.py thumbnail <template> <start> <end> |
Generate thumbnails |
make setup |
Set up via Makefile |
make test |
Test 1 draft via Makefile |
make run LIMIT=5 |
Run 5 drafts via Makefile |
Edit config.json:
| Key |
Description |
studio_url |
YouTube Studio draft list URL |
thumbnail_dir |
Thumbnail output folder |
profile_dir |
Browser session folder |
logs_dir |
Log and screenshot folder |
playlist_keywords |
Playlist-to-keyword mapping |
timezone |
Browser timezone, for example Asia/Jakarta |
schedule_time |
Publish time, for example 20:00 |
schedule_offset_days |
Day gap from previous video |
pause_between_drafts |
Manual pause between drafts |
screenshots |
Save debug screenshots |
headless |
Run browser without UI |
- Open YouTube Studio draft list
- Copy details from previous video
- Update title and description
- Upload thumbnail from
thumbnails/
- Configure monetization and rating
- Set end screen and playlist card
- Set publish schedule
| Mode |
Command |
Flow |
| Normal |
bash run.sh run 5 |
Process drafts in sequence and schedule them |
| Test |
bash run.sh test |
Try 1 draft first |
| No Schedule |
make run LIMIT=1 SCHEDULE=no |
Skip time/date input |
| Schedule Only |
make run LIMIT=2 SCHEDULE=only |
Jump straight to schedule step |
| Schedule Yes |
make run LIMIT=2 SCHEDULE=yes |
Full flow + schedule |
profile/ stores login session β do not commit it
config.json contains Studio URL β keep it private
- Timezone must match channel timezone
FAIL screenshots are always captured on errors
Distributed under the MIT License. See LICENSE.