Commit Graph

18 Commits (e398217aae19bb25f91797bfbe8a3243698d7f45)

Author SHA1 Message Date
coletdjnz 150ecc45d9
[networking] Add `legacy_ssl` request extension ()
Supported by Urllib, Requests and Websockets request handlers. Ignored by CurlCFFI.

Also added couple cookie-related tests.

Authored by: coletdjnz
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>
coletdjnz 53b4d44f55
[test] Fix connect timeout test ()
Fixes https://github.com/yt-dlp/yt-dlp/issues/9659

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

Authored by: bashonly
bashonly 50c2935231
[ie] Add extractor impersonate API ()
Authored by: bashonly, Grub4K, pukkandan
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>
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
pukkandan 069b2aedae
Create `ydl._request_director` when needed
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 6148833f5c
[cleanup] Misc
coletdjnz 4bf912282a
[networking] Remove dot segments during URL normalization ()
This implements RFC3986 5.2.4 remove_dot_segments during the URL normalization process.

Closes , 

Authored by: coletdjnz
coletdjnz bbeacff7fc
[networking] Ignore invalid proxies in env ()
Authored by: coletdjnz
coletdjnz 86aea0d3a2
[networking] Add strict Request extension checking ()
Authored by: coletdjnz
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
pukkandan 62b5c94cad
[cleanup] Misc fixes
Closes 
bashonly 71baa490eb
[networking] Fix POST requests with zero-length payloads ()
Bugfix for 227bf1a33b

Authored by: bashonly
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