1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-12-16 06:05:41 +07:00

Compare commits

...

3 Commits

Author SHA1 Message Date
sepro
ee98be4ad7 [ie/youtube] Disable deno/bun caching (#14849)
Fix 6224a38988

Closes #14847
Authored by: seproDev, coletdjnz

Co-authored-by: coletdjnz <coletdjnz@protonmail.com>
2025-11-01 07:23:35 +00:00
bashonly
c0c9f30695 [ie/youtube] Fix dashy formats extraction (#14852)
Fix 6224a38988

Closes #14850
Authored by: bashonly
2025-11-01 07:16:29 +00:00
bashonly
cacd1630a1 [ie/youtube] Fix remote components warning (#14853)
Fix 6224a38988

Authored by: bashonly
2025-11-01 07:15:15 +00:00
4 changed files with 24 additions and 13 deletions

View File

@@ -3261,16 +3261,7 @@ def process_https_formats():
if live_status not in ('is_live', 'post_live'):
fmt['available_at'] = available_at
if (all_formats or 'dashy' in format_types) and fmt['filesize']:
https_fmts.append({
**fmt,
'format_id': f'{fmt["format_id"]}-dashy' if all_formats else fmt['format_id'],
'protocol': 'http_dash_segments',
'fragments': build_fragments(fmt),
})
if all_formats or 'dashy' not in format_types:
fmt['downloader_options'] = {'http_chunk_size': CHUNK_SIZE}
https_fmts.append(fmt)
https_fmts.append(fmt)
# Bulk process sig/n handling
# Retrieve all JSC Sig and n requests for this player response in one go
@@ -3346,7 +3337,17 @@ def process_https_formats():
if fmt in https_fmts:
https_fmts.remove(fmt)
yield from https_fmts
for fmt in https_fmts:
if (all_formats or 'dashy' in format_types) and fmt['filesize']:
yield {
**fmt,
'format_id': f'{fmt["format_id"]}-dashy' if all_formats else fmt['format_id'],
'protocol': 'http_dash_segments',
'fragments': build_fragments(fmt),
}
if all_formats or 'dashy' not in format_types:
fmt['downloader_options'] = {'http_chunk_size': CHUNK_SIZE}
yield fmt
yield from process_https_formats()

View File

@@ -36,6 +36,7 @@
# `--no-install` appears to disable the cache.
# - npm auto-install may fail with an integrity error when using HTTP proxies
# - npm auto-install HTTP proxy support may be limited on older Bun versions
# - Cannot disable the transpiler / specify lang for stdin
@register_provider
@@ -100,6 +101,9 @@ def _get_env_options(self) -> dict[str, str]:
if self.ie.get_param('nocheckcertificate'):
options['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'
# Disable Bun transpiler cache
options['BUN_RUNTIME_TRANSPILER_CACHE_PATH'] = '0'
# Prevent segfault: <https://github.com/oven-sh/bun/issues/22901>
options.pop('JSC_useJIT', None)
if self.ejs_setting('jitless', ['false']) != ['false']:

View File

@@ -25,13 +25,19 @@
from yt_dlp.utils import Popen, remove_terminal_sequences
from yt_dlp.utils.networking import HTTPHeaderDict, clean_proxies
# KNOWN ISSUES:
# - Can't avoid analysis cache: https://github.com/yt-dlp/yt-dlp/pull/14849#issuecomment-3475840821
@register_provider
class DenoJCP(EJSBaseJCP, BuiltinIEContentProvider):
PROVIDER_NAME = 'deno'
JS_RUNTIME_NAME = 'deno'
_DENO_BASE_OPTIONS = ['--no-prompt', '--no-remote', '--no-lock', '--node-modules-dir=none', '--no-config']
_DENO_BASE_OPTIONS = [
'--ext=js', '--no-code-cache', '--no-prompt', '--no-remote',
'--no-lock', '--node-modules-dir=none', '--no-config',
]
DENO_NPM_LIB_FILENAME = 'yt.solver.deno.lib.js'
_NPM_PACKAGES_CACHED = False

View File

@@ -181,7 +181,7 @@ def join_parts(parts, joiner):
return parts[0]
return f'{", ".join(parts[:-1])} {joiner} {parts[-1]}'
if len(descriptions) > 1:
if len(descriptions) == 1:
msg = (
f'Remote component {descriptions[0]} was skipped. '
f'It may be required to solve JS challenges. '