From ecc1c379e6877013b7aec0e8c0d9292a8dec2f7b Mon Sep 17 00:00:00 2001 From: c-basalt <117849907+c-basalt@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:32:56 -0500 Subject: [PATCH] jsi pref --- yt_dlp/jsinterp/_deno.py | 1 - yt_dlp/options.py | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/yt_dlp/jsinterp/_deno.py b/yt_dlp/jsinterp/_deno.py index 80b2232286..87bdce9a1a 100644 --- a/yt_dlp/jsinterp/_deno.py +++ b/yt_dlp/jsinterp/_deno.py @@ -167,7 +167,6 @@ def execute(self, jscode, video_id=None, note='Executing JS in Deno with jsdom', onchange: null, orientation: {{angle: 0, type: 'landscape-primary', onchange: null}}, pixelDepth: 24, - width: 1920, }} Object.defineProperty(document.body, 'clientWidth', {{value: 1903}}); Object.defineProperty(document.body, 'clientHeight', {{value: 2000}}); diff --git a/yt_dlp/options.py b/yt_dlp/options.py index 06b65e0eac..a673c024f4 100644 --- a/yt_dlp/options.py +++ b/yt_dlp/options.py @@ -1138,6 +1138,13 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs): '--sleep-subtitles', metavar='SECONDS', dest='sleep_interval_subtitles', default=0, type=int, help='Number of seconds to sleep before each subtitle download') + workarounds.add_option( + '--jsi-preference', + metavar='JSI', dest='jsi_preference', default=[], type='str', action='callback', + callback=_list_from_options_callback, + help=( + 'Preferred JS interpreters to use during extraction. Can be given as comma-separated values.') + ) verbosity = optparse.OptionGroup(parser, 'Verbosity and Simulation Options') verbosity.add_option(