Skip to main content

External JavaScript for yt-dlp supporting many runtimes

Project description

yt-dlp-ejs

External JavaScript for yt-dlp supporting many runtimes

Manual Installation

Install ejs into the same environment as yt-dlp:

pip install -U yt-dlp-ejs

Development

The project provides lockfiles for every supported package manager.

If you only have Python and a JS runtime, then you may instead run ./hatch_build.py. This will transparently invoke one of the supported JS runtimes for the build.

If you notice differences between different runtimes' builds please open an issue here.

Build

To build the Python package you need a PEP518 compatible builder. The build hook will automatically invoke deno, bun or node as required.

Alternatively, to only build the JavaScript files you can run the bundle script manually:

python hatch_build.py

This will automatically select an available runtime and build using it.

Tests

First, make sure the project's dependencies are installed and download the player JS files:

# Deno:
deno install --frozen
deno run src/yt/solver/test/download.ts

# Bun:
bun install --frozen-lockfile
bun --bun run src/yt/solver/test/download.ts

# Node 22.6+:
npm ci
node --experimental-strip-types src/yt/solver/test/download.ts

Then the tests can be run:

# Deno
deno test

# Bun
bun test

# Node
node --test

Upgrading packages

When upgrading packages in package.json, all lockfiles must be updated simultaneously. To do this, run the following commands:

# Upgrade packages automatically (or manually adjust versions)
pnpm upgrade --latest

# Generate base `package-lock.json`
rm -rf node_modules
npm install

# Migrate to other package managers
pnpm import
bun pm migrate --force

# Make sure to use a deno with lockfile v4 (<2.3)
deno install --lockfile-only

# Ensure that `deno.json` is the same as `package-lock.json`.
# Note: you may need to manually update the `ADDITIONAL_PACKAGES_NODE`
# and/or `ADDITIONAL_PACKAGES_DENO` variables in `./check.py`.
python check.py

Licensing

This code is licensed under Unlicense.

An exception to this is the prebuilt wheels, which contain both meriyah and astring, licensed under ISC and MIT, respectively.

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_dlp_ejs-0.7.0.tar.gz (96.0 kB view details)

Uploaded Source

Built Distribution

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

yt_dlp_ejs-0.7.0-py3-none-any.whl (53.4 kB view details)

Uploaded Python 3

File details

Details for the file yt_dlp_ejs-0.7.0.tar.gz.

File metadata

  • Download URL: yt_dlp_ejs-0.7.0.tar.gz
  • Upload date:
  • Size: 96.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yt_dlp_ejs-0.7.0.tar.gz
Algorithm Hash digest
SHA256 ecac13eb9ff948da84b39f1030fa03422abaf32dc58a0edd78f5dbcc03843556
MD5 8df74afff9b71d980aab7c5f662eebdc
BLAKE2b-256 633957bc2dedbcd4c921fa740fc99f83ada045a219a0e9bb3283b9ab2102e840

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_dlp_ejs-0.7.0.tar.gz:

Publisher: release.yml on yt-dlp/ejs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file yt_dlp_ejs-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: yt_dlp_ejs-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 53.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yt_dlp_ejs-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 967e9cbe114ddfd046ff4668af18b1827b4597e2e47a83deea668a355828c798
MD5 e4303c2867fddd57a64ac29a6ed044c7
BLAKE2b-256 59f654fe93b9db02b7727043fb48816504f09066ca6d7f7d6145cd9d713a1047

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_dlp_ejs-0.7.0-py3-none-any.whl:

Publisher: release.yml on yt-dlp/ejs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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