Commit Graph

1312 Commits (4b50b292cc98534fb8c7cdf0ae5cb85862f7ebfc)

Author SHA1 Message Date
bashonly 297b0a3792
[ie/youtube] Fix JS `n` function name extraction ()
Fixes nsig decoding for player b22ef6e7

Closes 
Authored by: bashonly, seproDev

Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
Simon Sawicki 6c056ea7ae
[jsinterp] Implement `Function.prototype` resolving for `call` and `apply` ()
Authored by: Grub4K
Simon Sawicki 5ce582448e
[core] Disallow unsafe extensions (CVE-2024-38519)
Ref: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-79w7-vh3h-8g4j

Authored by: Grub4K
bashonly 6aaf96a3d6
[cleanup] Misc ()
Closes 
Authored by: bashonly, seproDev, jucor, c-basalt

Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
Co-authored-by: Julien Cornebise <julien@cornebise.com>
Co-authored-by: c-basalt <117849907+c-basalt@users.noreply.github.com>
bashonly 54a63e80af
[test:download] Raise on network errors ()
Authored by: bashonly, seproDev
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
Peisen Wang a8520244b8
[cookies] Fix `--cookies-from-browser` DE detection on Linux ()
Align with chromium source by parsing every part of `XDG_CURRENT_DESKTOP`

Authored by: peisenwang
sepro add96eb9f8
[cleanup] Add more ruff rules ()
Authored by: seproDev

Reviewed-by: bashonly <88596187+bashonly@users.noreply.github.com>
Reviewed-by: Simon Sawicki <contact@grub4k.xyz>
Simon Sawicki 5c019f6328
[misc] Cleanup ()
Closes 
Authored by: bashonly, seproDev, Grub4K

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
coletdjnz 96a134dea6
[ie/youtube] Extract upload timestamp if available ()
Closes , Closes 
Authored by: coletdjnz
Simon Sawicki e897bd8292
[misc] Add `hatch`, `ruff`, `pre-commit` and improve dev docs ()
Authored by: bashonly, seproDev, Grub4K

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
coletdjnz 53b4d44f55
[test] Fix connect timeout test ()
Fixes https://github.com/yt-dlp/yt-dlp/issues/9659

Authored by: coletdjnz
coletdjnz 3c7a287e28
[test] Add HTTP proxy tests ()
Also fixes HTTPS proxies for curl_cffi

Authored by: coletdjnz
bashonly bec9a59e8e
[networking] Add `extensions` attribute to `Response` ()
CurlCFFIRH now provides an `impersonate` field in its responses' extensions

Authored by: bashonly
Simon Sawicki 7e26bd53f9
[core/windows] Fix tests for `sys.executable` with spaces (Fix for 64766459e3)
Authored by: Grub4K
Simon Sawicki 64766459e3
[core/windows] Improve shell quoting and tests ()
Authored by: Grub4K
Simon Sawicki 3ee1194288
[ie] Make `_search_nextjs_data` non fatal ()
Authored by: Grub4K
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
bashonly 216f6a3cb5
[cleanup] Misc ()
Authored by: bashonly, pukkandan
Simon Sawicki 32abfb00bd
[utils] `traverse_obj`: Convenience improvements ()
Add support for:
- `http.cookies.Morsel`
- Multi type filters (`{type, type}`)

Authored by: Grub4K
pukkandan c305a25c1b
[cleanup] Standardize `import datetime as dt` ()
pukkandan 86a972033e
Infer `acodec` for single-codec containers
Simon Sawicki 3699eeb67c
[utils] `traverse_obj`: Allow unbranching using `all` and `any` ()
Authored by: Grub4K
Simon Sawicki 979ce2e786
[test] `traversal`: Separate traversal tests ()
Authored by: Grub4K
coletdjnz 52f5be1f1e
[rh:curlcffi] Add support for `curl_cffi`
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>
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>
coletdjnz f849d77ab5
[test] Workaround websocket server hanging ()
Authored by: coletdjnz
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>
sepro ac340d0745
[test:websockets] Fix timeout test on Windows ()
Authored by: seproDev
Lev 104a7b5a46
[ie] Migrate commonly plural fields to lists ()
Authored by: llistochek, pukkandan
Related: 
coletdjnz 0085e2bab8
[rh] Remove additional logging handlers on close ()
Fixes https://github.com/yt-dlp/yt-dlp/issues/8922

Authored by: coletdjnz
coletdjnz 35f4f764a7
[rh:requests] Apply `remove_dot_segments` to absolute redirect locations
Fixes https://github.com/yt-dlp/yt-dlp/issues/9020

Authored by: coletdjnz
coletdjnz 811d298b23
[networking] Remove `_CompatHTTPError` ()
Use `yt_dlp.networking.exceptions.HTTPError`.
`_CompatHTTPError` was to help with transition to the networking framework.

Authored by: coletdjnz
coletdjnz 69d3191495
[test] Skip source address tests if the address cannot be bound to ()
Fixes https://github.com/yt-dlp/yt-dlp/issues/8890

Authored by: coletdjnz
Simon Sawicki ffbd4f2a02
[utils] `traverse_obj`: Support `xml.etree.ElementTree.Element` ()
Authored by: Grub4K
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
bashonly 632b8ee54e
[core] Release workflow and Updater cleanup ()
- Only use trusted publishing with PyPI and remove support for PyPI tokens from release workflow
- Clean up improper actions syntax in the build workflow inputs
- Refactor Updater to allow for consistent unit testing with `UPDATE_SOURCES`

Authored by: bashonly
bashonly 37755a037e
[test:networking] Update tests for OpenSSL 3.2 ()
Authored by: bashonly
coletdjnz 196eb0fe77
[networking] Strip whitespace around header values ()
Fixes https://github.com/yt-dlp/yt-dlp/issues/8729
Authored by: coletdjnz
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
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
sepro 45d82be65f
[ie/nebula] Overhaul extractors ()
Closes , Closes , Closes , Closes , Closes 
Authored by: elyse0, pukkandan, seproDev

Co-authored-by: Elyse <26639800+elyse0@users.noreply.github.com>
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
bashonly f4b95acafc
Remove Python 3.7 support ()
Closes 
Authored by: bashonly
bashonly f04b5bedad
[ie] Do not smuggle `http_headers`
See: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-3ch3-jhc6-5r8x

Authored by: coletdjnz
bashonly 87264d4fda
[test:update] Implement simple updater unit tests
Authored by: bashonly
Simon Sawicki 4e38e2ae9d
[rh:requests] Handle both `bytes` and `int` for `IncompleteRead.partial` (Fix 8a8b54523a) ()
Authored by: bashonly, coletdjnz, Grub4K
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