From 98ae72ff50cddb514f17cfd02dba8ce4618735c7 Mon Sep 17 00:00:00 2001 From: c-basalt <117849907+c-basalt@users.noreply.github.com> Date: Tue, 25 Feb 2025 23:39:47 -0500 Subject: [PATCH] remove jitless --- README.md | 4 ++-- test/test_jsi_external.py | 6 +----- yt_dlp/YoutubeDL.py | 2 ++ yt_dlp/jsinterp/__init__.py | 1 - yt_dlp/jsinterp/_deno.py | 13 ------------- 5 files changed, 5 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 8b2a644ea..169efad58 100644 --- a/README.md +++ b/README.md @@ -212,7 +212,7 @@ ### Metadata ### Misc * [**pycryptodomex**](https://github.com/Legrandin/pycryptodome)\* - For decrypting AES-128 HLS streams and various other data. Licensed under [BSD-2-Clause](https://github.com/Legrandin/pycryptodome/blob/master/LICENSE.rst) -* [**phantomjs**](https://github.com/ariya/phantomjs) - Used in extractors where javascript needs to be run. Licensed under [BSD-3-Clause](https://github.com/ariya/phantomjs/blob/master/LICENSE.BSD) +* [**phantomjs**](https://github.com/ariya/phantomjs), [**deno**](https://github.com/denoland/deno/) - Used in extractors where javascript needs to be run. Licensed under [BSD-3-Clause](https://github.com/ariya/phantomjs/blob/master/LICENSE.BSD) and [MIT](https://github.com/xattr/xattr/blob/master/LICENSE.txt) respectively * [**secretstorage**](https://github.com/mitya57/secretstorage)\* - For `--cookies-from-browser` to access the **Gnome** keyring while decrypting cookies of **Chromium**-based browsers on **Linux**. Licensed under [BSD-3-Clause](https://github.com/mitya57/secretstorage/blob/master/LICENSE) * Any external downloader that you want to use with `--downloader` @@ -790,7 +790,7 @@ ## Workarounds: be used along with --min-sleep-interval --sleep-subtitles SECONDS Number of seconds to sleep before each subtitle download - --jsi-preference Preferred JS interpreters to use during + --jsi-preference JSI Preferred JS interpreters to use during extraction. Can be given as comma-separated values diff --git a/test/test_jsi_external.py b/test/test_jsi_external.py index 2fa800278..e4b8f9c17 100644 --- a/test/test_jsi_external.py +++ b/test/test_jsi_external.py @@ -21,7 +21,7 @@ ) from yt_dlp.cookies import YoutubeDLCookieJar from yt_dlp.jsinterp.common import ExternalJSI, _ALL_FEATURES -from yt_dlp.jsinterp._deno import DenoJSI, DenoJITlessJSI, DenoJSDomJSI +from yt_dlp.jsinterp._deno import DenoJSI, DenoJSDomJSI from yt_dlp.jsinterp._phantomjs import PhantomJSJSI from yt_dlp.jsinterp._helper import prepare_wasm_jsmodule @@ -206,10 +206,6 @@ class TestDeno(Base.TestExternalJSI): _JSI_CLASS = DenoJSI -class TestDenoJITless(Base.TestExternalJSI): - _JSI_CLASS = DenoJITlessJSI - - class TestDenoDom(Base.TestExternalJSI): _JSI_CLASS = DenoJSDomJSI diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index f8dae3a53..90aa14e70 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -437,6 +437,8 @@ class YoutubeDL: Actual sleep time will be a random float from range [sleep_interval; max_sleep_interval]. sleep_interval_subtitles: Number of seconds to sleep before each subtitle download + jsi_preference: Preferred JS interpreters to use during extraction. Can be + given as comma-separated values. listformats: Print an overview of available video formats and exit. list_thumbnails: Print a table of all thumbnails and exit. match_filter: A function that gets called for every video with the signature diff --git a/yt_dlp/jsinterp/__init__.py b/yt_dlp/jsinterp/__init__.py index de1abe497..fd90b92ad 100644 --- a/yt_dlp/jsinterp/__init__.py +++ b/yt_dlp/jsinterp/__init__.py @@ -2,7 +2,6 @@ from .native import JSInterpreter from .common import _JSI_PREFERENCES, _JSI_HANDLERS, JSIWrapper from ._phantomjs import PhantomJSwrapper -from . import _deno __all__ = [ diff --git a/yt_dlp/jsinterp/_deno.py b/yt_dlp/jsinterp/_deno.py index 87bdce9a1..63d9ff9c3 100644 --- a/yt_dlp/jsinterp/_deno.py +++ b/yt_dlp/jsinterp/_deno.py @@ -10,7 +10,6 @@ from ..utils import ( ExtractorError, Popen, - classproperty, int_or_none, shell_quote, unified_timestamp, @@ -58,18 +57,6 @@ def execute(self, jscode, video_id=None, note='Executing JS in Deno'): return self._run_deno(cmd) -@register_jsi -class DenoJITlessJSI(DenoJSI): - _SUPPORTED_FEATURES = {'location'} - _BASE_PREFERENCE = 6 - _EXE_NAME = DenoJSI._EXE_NAME - _DENO_FLAGS = ['--cached-only', '--no-prompt', '--no-check', '--v8-flags=--jitless,--noexpose-wasm'] - - @classproperty - def exe_version(cls): - return DenoJSI.exe_version - - @register_jsi class DenoJSDomJSI(DenoJSI): _SUPPORTED_FEATURES = {'wasm', 'location', 'dom', 'cookies'}