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 uses pnpm as a package manager with dependencies pinned through pnpm-lock.yaml.

If you only have Python and a JS runtime you may instead invoke ./pnpm.py, which will transparently invoke one of the supported JS runtimes to call pnpm.

This pure JavaScript approach should be runtime agnostic. 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 pnpm.py install --frozen-lockfile
python pnpm.py run bundle

This will automatically select an available runtime and invoke pnpm to build it.

Tests

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

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

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

# Node 22.6+:
python pnpm.py install --frozen-lockfile
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

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.3.2.tar.gz (34.7 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.3.2-py3-none-any.whl (53.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yt_dlp_ejs-0.3.2.tar.gz
  • Upload date:
  • Size: 34.7 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.3.2.tar.gz
Algorithm Hash digest
SHA256 31a41292799992bdc913e03c9fac2a8c90c82a5cbbc792b2e3373b01da841e3e
MD5 c747998b5635added22ec93abea12475
BLAKE2b-256 de7257d02cf78eb45126bd171298d6a58a5bd48ce1a398b6b7ff00fc904f1f0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_dlp_ejs-0.3.2.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.3.2-py3-none-any.whl.

File metadata

  • Download URL: yt_dlp_ejs-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 53.3 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.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f2dc6b3d1b909af1f13e021621b0af048056fca5fb07c4db6aa9bbb37a4f66a9
MD5 5a946197fccb84fbf91892ac6623d771
BLAKE2b-256 9d0d1f0d7a735ca60b87953271b15d00eff5eef05f6118390ddf6f81982526ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_dlp_ejs-0.3.2-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