Automate YouTube Uploads via Python

Замовник: AI | Опубліковано: 05.04.2026

I want a small, rock-solid Python script that runs on my Hostinger VPS and pushes videos straight to a single YouTube channel automatically. My current workflow is manual and fragile; your job is to replace it with a resilient uploader that never loses its session and can pick up where it left off if a transfer is interrupted. Here is what I already have in place: • A JSON file holding title, description, and tag data for each video. • Full OAuth 2.0 credentials (Client ID and Client Secret) generated in Google Cloud Console. • A sandbox channel for immediate testing access. What the finished script must do: 1. Handle OAuth 2.0 refresh tokens seamlessly, storing and re-using them so I never have to click an auth link again. 2. Use the YouTube Data API v3 resumable upload protocol to guarantee stability on larger files. 3. Read the metadata from my local JSON file and map the fields to YouTube’s title, description, and tags parameters automatically. 4. Run cleanly on a standard Hostinger shared/VPS environment (Python 3.x, no root access assumed). 5. Produce console or log output that clearly shows progress, errors, and the final video URL. Milestone & acceptance test: once the script performs a single successful upload to my sandbox channel using the client-secret JSON I provide, the first milestone is released. I’ll supply a small sample video for this test. Please lean on google-api-python-client, oauth2client, or your preferred modern alternative, but keep external dependencies lightweight and well-documented in a requirements.txt. Include a concise README so I can schedule the script via cron the moment we’re done. Milestone 1: Successful automated upload of one test video from my server to my designated test channel. Specific Channel ID and Client Secret JSON will be shared privately with the selected candidate.