mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-12-16 06:05:41 +07:00
Compare commits
3 Commits
6224a38988
...
ee98be4ad7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee98be4ad7 | ||
|
|
c0c9f30695 | ||
|
|
cacd1630a1 |
@@ -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()
|
||||
|
||||
|
||||
@@ -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']:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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. '
|
||||
|
||||
Reference in New Issue
Block a user