Skip to main content

No project description provided

Project description

yt_updater

Useful tools for bulk-updating YouTube playlists and scheduling publication en masse

Setup

You will need to create an application for the YouTube Data API. See the getting started guide for more information.

You'll need to create an OAuth 2.0 client set as a "Desktop app." After creating an OAuth 2.0 client, download its client data and save it as client.json or the like. If you need multiple registered apps for some reason, you can specify your client file with the --client-json option.

When you first use the application, it will prompt you to log in and grant access to your channel. If you want to switch between multiple channels, you can specify different login tokens with the --login-token option (the specified file will be created if it doesn't yet exist).

Also note that if you register the application as a test application, you'll need to add your Google account to the allow list.

Usage

  1. Upload all of your track videos as drafts, and bulk-add them to a playlist (which can remain private) and set their video category.

  2. Run getPlaylist playlist_id > playlist.json to generate your playlist JSON

  3. Run updateVideos -n playlist.json album.json to see what changes the script will make; remove the -n and run again if you approve. updateVideos --help will give you a bunch more useful options for things like generating video descriptions, scheduling the videos' publications (with an optional inter-track time offset to make the playlist management a little easier or even letting you stagger them by minutes/hours/etc.) and so on.

Note that even in -n mode this will still make API requests which will drain your daily request quota.

Scripts

This package provides the following scripts:

  • getPlaylist: Given a playlist ID, download the necessary information into a JSON file
  • updateVideos: Given a playlist JSON file and an album descriptor, update the videos on the playlist with the descriptor.

The album descriptor is a JSON file that contains a property bag with the following properties:

  • tracks: Maps to an array of track, in the order of the album. Each track is a property bag with the following properties:
    • title: The title of the track
    • Other properties as appropriate, e.g. lyrics, description, etc.

These descriptor files can be created and edited using Bandcrash.

The title templates are strings which can embed the following template items (as Python formatters):

* `{tnum}`: The track number on the album
* `{title}`: The plaintext title of the track
* `{filename}`: A filename-compatible version of the track title, as slugified by Bandcrash

The description template is a file in Jinja2 format. When it's run, it's given the following template items:

  • album: The top-level album descriptor
  • tnum: The track number on the album
  • track: The track data from the album descriptor
  • item: The original YouTube item data from the playlist file

An example template is in templates/description.txt.

Disclaimer

This software was partially written with the help of Google's AI chatbot, because life's too short to try to wade through Google's incomprehensibly-dense-yet-vague API documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yt_updater-0.1.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yt_updater-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file yt_updater-0.1.0.tar.gz.

File metadata

  • Download URL: yt_updater-0.1.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.7 Darwin/25.0.0

File hashes

Hashes for yt_updater-0.1.0.tar.gz
Algorithm Hash digest
SHA256 040f33d6248ea0df4cc9eeeffc8723a75d838bc5d24d76391cb3a357f1224dfd
MD5 6b20a4b04972c43d992aebb2db80bbae
BLAKE2b-256 9725e1bd360460ed270ad1cd808a70d1f37d7ca1b8f323d9bcb0ced116dece23

See more details on using hashes here.

File details

Details for the file yt_updater-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: yt_updater-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.7 Darwin/25.0.0

File hashes

Hashes for yt_updater-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 763898dedef7ee6a3e71514d03ea56b76c4180bd9218f437bdcd61f5487ba24c
MD5 ff93d91e4626fe23b7f166c7dc1fc34b
BLAKE2b-256 91168db836f477ba68cb5b014091bdd32349a6e10257ffb2de5c41d37b26c02f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page