Commit Graph

546 Commits (96a134dea6397a5f2131947c427aac52c8b4e677)

Author SHA1 Message Date
DaPotato69 7e4259dff0
Better warning when requested subs format not found ()
Closes 
Authored by: DaPotato69
sepro 96da952504
[core] Warn if lack of ffmpeg alters format selection ()
Authored by: seproDev, pukkandan
Simon Sawicki ff07792676
[core] Prevent RCE when using `--exec` with `%q` (CVE-2024-22423)
The shell escape function now properly escapes `%`, `\\` and `\n`. `utils.Popen` as well as `%q` output template expansion have been patched accordingly.

Prior to this fix using `--exec` together with `%q` when on Windows could cause remote code to execute. See https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p for more details.

Authored by: Grub4K
Simon Sawicki 9590cc6b47
Add new option `--progress-delta` ()
Authored by: Grub4K
pukkandan c305a25c1b
[cleanup] Standardize `import datetime as dt` ()
sepro 86e3b82261
[core] Fix `filesize_approx` calculation ()
Reverts 22e4dfacb6

Despite being documented as `Kbit/s`, the extractors/manifests were returning bitrates in SI units of kilobits/sec.

Authored by: seproDev, pukkandan
pukkandan 86a972033e
Infer `acodec` for single-codec containers
coletdjnz 0b81d4d252
Add new options `--impersonate` and `--list-impersonate-targets`
Authored by: coletdjnz, Grub4K, pukkandan, bashonly

Co-authored-by: Simon Sawicki <contact@grub4k.xyz>
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
Co-authored-by: bashonly <bashonly@protonmail.com>
pukkandan 615a84447e
[cleanup] Misc ()
Authored by: pukkandan, bashonly, seproDev
pukkandan 47ab66db0f
[docs] Misc Cleanup ()
Closes , 

Authored by: bashonly, Grub4k, Arthurszzz, seproDev, pukkandan

Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
Co-authored-by: bashonly <bashonly@protonmail.com>
Co-authored-by: Arthurszzz <minecraftgamerarthur@gmail.com>
Co-authored-by: Simon Sawicki <accounts@grub4k.xyz>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Simon Sawicki dbd8b1bff9
Improve 069b2aedae
Authored by: Grub4k
bashonly 263a4b55ac
[core] Handle `--load-info-json` format selection errors ()
Closes 
Authored by: bashonly
bashonly b136e2af34
Bugfix for 104a7b5a46 ()
Authored by: bashonly
pukkandan 069b2aedae
Create `ydl._request_director` when needed
Lev 104a7b5a46
[ie] Migrate commonly plural fields to lists ()
Authored by: llistochek, pukkandan
Related: 
Alard 4ce57d3b87
[ie] Support multi-period MPD streams ()
bashonly d63eae7e7f
[core] Don't select storyboard formats as fallback
Closes 
Authored by: bashonly
coletdjnz 811d298b23
[networking] Remove `_CompatHTTPError` ()
Use `yt_dlp.networking.exceptions.HTTPError`.
`_CompatHTTPError` was to help with transition to the networking framework.

Authored by: coletdjnz
Simon Sawicki f9fb3ce86e
[cleanup] Misc ()
Authored by: bashonly, pukkandan, seproDev, Grub4K

Co-authored-by: bashonly <bashonly@protonmail.com>
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
Simon Sawicki 00cdda4f6f
[core] Fix format selection parse error for CPython 3.12 ()
Authored by: Grub4K
Simon Sawicki 0b6f829b1d
[utils] `traverse_obj`: Move `is_user_input` into output template ()
Authored by: Grub4K
pukkandan 993edd3f6e
[outtmpl] Support multiplication
Related: 
sepro 1732eccc0a
[core] Parse `release_year` from `release_date` ()
Closes 
Authored by: seproDev
pk a0b19d319a
[core] Support `NO_COLOR` environment variable ()
Authored by: prettykool, Grub4K
coletdjnz ccfd70f4c2
[rh:websockets] Migrate websockets to networking framework ()
* Adds a basic WebSocket framework
* Introduces new minimum `websockets` version of 12.0
* Deprecates `WebSocketsWrapper`

Fixes https://github.com/yt-dlp/yt-dlp/issues/8439

Authored by: coletdjnz
bashonly 0b6ad22e6a
[update] Overhaul self-updater
Authored by: bashonly, Grub4K

Co-authored-by: Simon Sawicki <contact@grub4k.xyz>
bashonly 20314dd46f
[core] Include build origin in verbose output
Authored by: bashonly, Grub4K

Co-authored-by: Simon Sawicki <contact@grub4k.xyz>
bashonly 10025b715e
[core] Add `--compat-option manifest-filesize-approx` ()
Closes 
Authored by: bashonly
bashonly 595ea4a99b
[core] Fix format sorting with `--load-info-json` ()
Closes 
Authored by: bashonly
bashonly ef79d20dc9
[ie/youtube] Check newly uploaded iOS HLS formats ()
Closes 
Authored by: bashonly
bashonly a40e0b37df
[core] Only ensure playlist thumbnail dir if writing thumbs ()
Bugfix for 2acd1d555e

Closes 
Authored by: bashonly
coletdjnz 8a8b54523a
[rh:requests] Add handler for `requests` HTTP library ()
Adds support for HTTPS proxies and persistent connections (keep-alive)

Closes https://github.com/yt-dlp/yt-dlp/issues/1890
Resolves https://github.com/yt-dlp/yt-dlp/issues/4070
Resolves https://github.com/ytdl-org/youtube-dl/issues/32549
Resolves https://github.com/ytdl-org/youtube-dl/issues/14523
Resolves https://github.com/ytdl-org/youtube-dl/issues/13734

Authored by: coletdjnz, Grub4K, bashonly
Riteo 2acd1d555e
[core] Ensure thumbnail output directory exists ()
Closes 
Authored by: Riteo
Simon Sawicki 61bdf15fc7
[core] Raise minimum recommended Python version to 3.8 ()
Authored by: Grub4K
bashonly 5ca095cbcd
[cleanup] Misc ()
Closes , Closes 
Authored by: barsnick, sqrtNOT, gamer191, coletdjnz, Grub4K, bashonly
Simon Sawicki 836e06d246
[core] Fix support for upcoming Python 3.12 ()
This also adds the following test runners:
- `3.12-dev` on `ubuntu-latest`
- `3.12-dev` on `windows-latest`
- `pypy-3.10` on `ubuntu-latest`

Authored by: Grub4K
coletdjnz db7b054a61
[networking] Add request handler preference framework ()
Preference functions that take a request and a request handler instance can be registered to prioritize different request handlers per request.

Authored by: coletdjnz
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
pukkandan f73c118035
`FFmpegFixupM3u8PP` may need to run with ffmpeg
Bug in 62b5c94cad
Closes 
pukkandan 6148833f5c
[cleanup] Misc
pukkandan 8cb7fc44db
Fix `--check-formats`
Bug in bc344cd456
pukkandan 62b5c94cad
[cleanup] Misc fixes
Closes 
pukkandan a264433c9f
[outtmpl] Fix replacement for `playlist_index`
bashonly 75dc8e673b
[networking] Fix `--legacy-server-connect` ()
Bugfix for 227bf1a33b

Authored by: bashonly
bashonly 6c5211cebe
[core] Fix HTTP headers and cookie handling
- Remove `Cookie` header from `http_headers` immediately after loading into cookiejar
- Restore compat for `--load-info-json` cookies
- Add more tests
- Fix improper passing of Cookie header by `MailRu` extractor

Closes 
Authored by: bashonly, pukkandan
Aaruni Kaushik 2b029ca0a9
[cleanup] Add color to `download-archive` message ()
Authored by: aaruni96, Grub4K, pukkandan
Closes 
coletdjnz 3d2623a898
[compat, networking] Deprecate old functions ()
Authored by: coletdjnz, pukkandan
coletdjnz 227bf1a33b
[networking] Rewrite architecture ()
New networking interface consists of a `RequestDirector` that directs
each `Request` to appropriate `RequestHandler` and returns the
`Response` or raises `RequestError`. The handlers define adapters to
transform its internal Request/Response/Errors to our interfaces.

User-facing changes:
- Fix issues with per request proxies on redirects for urllib
- Support for `ALL_PROXY` environment variable for proxy setting
- Support for `socks5h` proxy
   - Closes https://github.com/yt-dlp/yt-dlp/issues/6325, https://github.com/ytdl-org/youtube-dl/issues/22618, https://github.com/ytdl-org/youtube-dl/pull/28093
- Raise error when using `https` proxy instead of silently converting it to `http`

Authored by: coletdjnz
pukkandan c365dba843
[networking] Add module ()
No actual changes - code is only moved around
Simon Sawicki 3121512228
[core] Change how `Cookie` headers are handled
Cookies are now saved and loaded under `cookies` key in the info dict
instead of `http_headers.Cookie`. Cookies passed in headers are
auto-scoped to the input URLs with a warning.

Ref: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-v8mc-9377-rwjj

Authored by: Grub4K
pukkandan bc344cd456
[core] Allow extractors to mark formats as potentially DRM ()
This is useful for HLS where detecting whether the format is
actually DRM requires the child manifest to be downloaded.

Makes the error message when using `--test` inconsistent,
but doesn't really matter.