Commit Graph

46 Commits (1d6ab17d0752ee9cf19e3e63c7dec7b600d3f228)

Author SHA1 Message Date
Simon Sawicki f2a4ea1794
[pp/embedthumbnail] Fix postprocessor ()
* [compat] Improve `imghdr.what` detection
* [pp/embedthumbnail] Improve imghdr fail message
* [pp/embedthumbnail] Fix AtomicParsley error handling

Authored by: Grub4K
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 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
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>
coletdjnz 811d298b23
[networking] Remove `_CompatHTTPError` ()
Use `yt_dlp.networking.exceptions.HTTPError`.
`_CompatHTTPError` was to help with transition to the networking framework.

Authored by: coletdjnz
bashonly f4b95acafc
Remove Python 3.7 support ()
Closes 
Authored by: bashonly
Simon Sawicki de015e9307
[core] Prevent RCE when using `--exec` with `%q` (CVE-2023-40581)
The shell escape function is now using `""` instead of `\"`. `utils.Popen` has been patched to properly quote commands.

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-42h4-v29r-42qg for reference.

Authored by: Grub4K
bashonly 5ca095cbcd
[cleanup] Misc ()
Closes , Closes 
Authored by: barsnick, sqrtNOT, gamer191, coletdjnz, Grub4K, bashonly
bashonly 35f9a306e6
[dependencies] Handle deprecation of `sqlite3.version` ()
Closes 
Authored by: bashonly
pukkandan a250b24733
[compat] Ensure submodules are imported correctly
Closes 
pukkandan 25b6e8f946
Fix e0c4db04dc for pypy
pukkandan 62b5c94cad
[cleanup] Misc fixes
Closes 
pukkandan e0c4db04dc
[compat] Add `types.NoneType`
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
coletdjnz 3f66b6fe50
[core] Workaround erroneous urllib Windows proxy parsing ()
Convert proxies extracted from windows registry to http for older Python versions.
See: https://github.com/python/cpython/issues/86793

Authored by: coletdjnz
pukkandan 65f6e80780
[dependencies] Simplify `Cryptodome`
Closes , closes , closes 
pukkandan 45b2ee6f4f
Update to ytdl-commit-2dd6c6e
[YouTube] Avoid crash if uploader_id extraction fails
2dd6c6edd8

Except:
    * 295736c9cba714fb5de7d1c3dd31d86e50091cf8 [jsinterp] Improve parsing
    * 384f632e8a9b61e864a26678d85b2b39933b9bae [ITV] Overhaul ITV extractor
    * 33db85c571304bbd6863e3407ad8d08764c9e53b [feat]: Add support to external downloader aria2p
pukkandan 768a001781
[compat_utils] Simplify `EnhancedModule`
pukkandan acb1042a9f
[devscripts] Provide pyinstaller hooks
Closes 
pukkandan 88426d9446
[compat_utils] Improve `passthrough_module`
pukkandan f6a765ceb5
[dependencies] Standardize `Cryptodome` imports
pukkandan 754c84e2e4
Support module level `__bool__` and `property`
ClosedPort22 fbb0ee7747
[compat] Fix `shutils.move` in restricted ACL mode on BSD ()
Authored by: ClosedPort22, pukkandan
pukkandan db4678e448
Update to ytdl-commit-de39d128
[extractor/ceskatelevize] Back-port extractor from yt-dlp
de39d1281c

Closes , Closes , Closes 
Alex Karabanov 0d2a0ecac3
[extractor/listennotes] Add extractor ()
Closes 
Authored by: lksj, pukkandan
pukkandan b4daacb4ec
[mhtml, cleanup] Use imghdr
pukkandan 6929b41a21
Remove Python 3.6 support
Closes 
pukkandan f5e438a976
[compat] Let PyInstaller detect _legacy module
pukkandan ae61d108dd
[cleanup] Misc cleanup
pukkandan 54007a45f1
[cleanup] Consistent style for file heads
pukkandan ac66811112
[compat] Remove more functions
Removing any more will require changes to a large number of extractors
pukkandan 3c5386cd71
[compat] Fix `compat.WINDOWS_VT_MODE`
pukkandan 57e0f077a6
[update] Expose more functionality to API
pukkandan 560738f34d
[extractor] Import `_ALL_CLASSES` lazily
This significantly speeds up `import yt_dlp` in the absence of `lazy_extractors`
pukkandan 8a82af3511
[cleanup] Misc fixes and cleanup
Closes , Closes , Closes 
pukkandan 1a8cc83735
Bugfix for 3a408f9d19
pukkandan 2762dbb17e
[compat] Add `functools.cached_property`
pukkandan 53973b4d2c
[utils] Fix bug in 0b9c08b47b
* Cache of `supports_terminal_sequences` must be reset after enabling VT mode
* and move `windows_enable_vt_mode` to utils to avoid cyclic imports
pukkandan 0b9c08b47b
[utils] Improve performance using `functools.cache`
Closes 
pukkandan 5792c950bf
[compat] Implement `compat.imghdr`
Python 3.11 deprecates `imghdr` module
pukkandan 1d485a1a79
[cleanup] Misc fixes
Closes , https://github.com/yt-dlp/yt-dlp/issues/3514#issuecomment-1105944364
pukkandan 059bc4db19
[compat/asyncio] Use `asyncio.all_tasks`
pukkandan 9196cbfe8b
[compat] Ensure submodules are correctly wrapped
pukkandan 9b8ee23b99
[dependencies] Create module with all dependency imports
felix 77f9033095
[compat] Split into sub-modules ()
Authored by: fstirlitz, pukkandan