Commit Graph

1245 Commits (a250b247334ce9f641e709cbb64974da6034a2b3)

Author SHA1 Message Date
pukkandan a250b24733
[compat] Ensure submodules are imported correctly
Closes #7663
1 year ago
pukkandan 62b5c94cad
[cleanup] Misc fixes
Closes #7528
1 year ago
pukkandan a264433c9f
[outtmpl] Fix replacement for `playlist_index` 1 year ago
bashonly e57eb98222
[fd/external] Fix ffmpeg input from stdin (#7655)
Bugfix for 1ceb657bdd

Authored by: bashonly
1 year ago
bashonly af86873218
[utils] Improve `parse_duration`
Authored by: bashonly
1 year ago
bashonly 75dc8e673b
[networking] Fix `--legacy-server-connect` (#7645)
Bugfix for 227bf1a33b

Authored by: bashonly
1 year ago
bashonly 71baa490eb
[networking] Fix POST requests with zero-length payloads (#7648)
Bugfix for 227bf1a33b

Authored by: bashonly
1 year ago
bashonly 42ded0a429
[fd/external] Fixes to cookie handling
- Fix bug in `axel` Cookie header arg
- Pass cookies to `curl` as strings
- Write session cookies for `aria2c` and `wget`

Closes #7539
Authored by: bashonly
1 year ago
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 #7558
Authored by: bashonly, pukkandan
1 year ago
coletdjnz 3d2623a898
[compat, networking] Deprecate old functions (#2861)
Authored by: coletdjnz, pukkandan
1 year ago
coletdjnz 227bf1a33b
[networking] Rewrite architecture (#2861)
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
1 year ago
pukkandan c365dba843
[networking] Add module (#2861)
No actual changes - code is only moved around
1 year ago
pukkandan 1b392f905d
[utils] Add temporary shim for logging
Related: #5680, #7517
1 year ago
Mahmoud Abdel-Fattah 2af4eeb772
[utils] `clean_podcast_url`: Handle more trackers (#7556)
Authored by: mabdelfattah, bashonly
Closes #7544
1 year ago
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
1 year ago
coletdjnz f8b4bcc0a7
[core] Prevent `Cookie` leaks on HTTP redirect
Ref: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-v8mc-9377-rwjj

Authored by: coletdjnz
1 year ago
bashonly 1ceb657bdd
[fd/external] Scope cookies
- ffmpeg: Calculate cookies from cookiejar and pass with `-cookies` arg instead of `-headers`
- aria2c, curl, wget: Write cookiejar to file and use external FD built-in cookiejar support
- httpie: Calculate cookies from cookiejar instead of `http_headers`
- axel: Calculate cookies from cookiejar and disable http redirection if cookies are passed
    - May break redirects, but axel simply don't have proper cookie support

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

Authored by: bashonly, coletdjnz
1 year ago
pukkandan 47bcd43724
[outtmpl] Pad `playlist_index` etc even when with internal formatting
Closes #7501
1 year ago
pukkandan cd810afe2a
[extractor/youtube] Improve nsig function name extraction 1 year ago
pukkandan 42f2d40b47
Update to ytdl-commit-07af47
[YouTube] Improve fix for ae8ba2c
07af47960f
1 year ago
pukkandan 1619ab3e67
Bugfix for ebe1b4e34f 1 year ago
pukkandan ad54c9130e
[cleanup] Misc
Closes #6288, Closes #7197, Closes #7265, Closes #7353, Closes #5773
Authored by: mikf, freezboltz, pukkandan
1 year ago
pukkandan ebe1b4e34f
[outtmpl] Fix some minor bugs
Closes #7164
1 year ago
pukkandan eedda5252c
[utils] `FormatSorter`: Improve `size` and `br`
Closes #1596

Previously, when some formats have accurate size and some approximate,
the ones with accurate size was always prioritized

For formats with known tbr and unknown vbr/abr, we were setting
(vbr=tbr, abr=0) for sorting to work. This is no longer needed.

Authored by pukkandan, u-spec-png
1 year ago
pukkandan 01aba2519a
[jsinterp] Fix global object extraction
Closes #7327
1 year ago
bashonly b4a252fba8
[jsinterp] Fix division (#7279)
* Fixes nsig decryption for Youtube JS player `8c7583ff`

Authored by: bashonly
1 year ago
Matt Broadway b38d4c941d
[cookies] Update for chromium changes (#6897)
Authored by: mbway
2 years ago
coletdjnz daafbf49b3
[core] Support decoding multiple content encodings (#7142)
Authored by: coletdjnz
2 years ago
coletdjnz b87e01c123
[cookies] Move `YoutubeDLCookieJar` to cookies module (#7091)
Authored by: coletdjnz
2 years ago
coletdjnz 08916a49c7
[core] Improve HTTP redirect handling (#7094)
Aligns HTTP redirect handling with what browsers commonly do and RFC standards. 

Fixes issues afac4caa7d missed.

Authored by: coletdjnz
2 years ago
pukkandan 7aeda6cc9e
[jsinterp] Do not compile regex 2 years ago
pukkandan 4823ec9f46
Update to ytdl-commit-d1c6c5
[YouTube] [core] Improve platform debug log, based on yt-dlp
d1c6c5c4d6

Except:
    * 6ed34338285f722d0da312ce0af3a15a077a3e2a [jsinterp] Add short-cut evaluation for common expression
        * There was no performance improvement when tested with https://github.com/ytdl-org/youtube-dl/issues/30641
    * e8de54bce50f6f77a4d7e8e80675f7003d5bf630 [core] Handle `/../` sequences in HTTP URLs
        * We plan to implement this differently
2 years ago
pukkandan 6f2287cb18
[cleanup] Misc
Closes #7030, closes #6967
2 years ago
pukkandan 1d7656184c
[jsinterp] Handle `NaN` in bitwise operators
Closes #6131
2 years ago
Simon Sawicki b079c26f0a
[utils] `traverse_obj`: More fixes (#6959)
- Fix result when branching with `traverse_string`
- Fix `slice` path on `dict`s
- Fix tests and docstrings from 21b5ec86c2
- Add `is_iterable_like` helper function

Authored by: Grub4K
2 years ago
pukkandan 7cf51f2191
[jsinterp] Handle negative numbers better
Closes #6131
2 years ago
Simon Sawicki 21b5ec86c2
[utils] `traverse_obj`: Allow iterables in traversal (#6902)
Authored by: Grub4K
2 years ago
pukkandan ec9311c41b
[outtmpl] Support `str.format` syntax inside replacements
Closes #6843
2 years ago
pukkandan 78fde6e339
[outtmpl] Allow `\n` in replacements and default.
Fixes: https://github.com/yt-dlp/yt-dlp/issues/6808#issuecomment-1510055357
Fixes: https://github.com/yt-dlp/yt-dlp/issues/6808#issuecomment-1510363645
2 years ago
Simon Sawicki 0898c5c8cc
[utils] `js_to_json`: Implement template strings (#6623)
Authored by: Grub4K
2 years ago
pukkandan f68434cc74
[extractor] Extract more metadata from ISM
Fixes 81b6102d20 (r105892531)
2 years ago
pukkandan 9acf1ee25f
[jsinterp] Handle `Date` at epoch 0
Closes #6400
2 years ago
pukkandan 65f6e80780
[dependencies] Simplify `Cryptodome`
Closes #6292, closes #6272, closes #6338
2 years ago
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
2 years ago
Simon Sawicki 6839ae1f6d
[utils] `traverse_obj`: Fix more bugs
and cleanup uses of `default=[]`

Continued from b1bde57bef
2 years ago
Simon Sawicki b1bde57bef
[utils] `traverse_obj`: Fix several behavioral problems
See #6180 for further info

Authored by: Grub4K
2 years ago
pukkandan f6a765ceb5
[dependencies] Standardize `Cryptodome` imports 2 years ago
Simon Sawicki 776995bc10
[utils] `traverse_obj`: Various improvements
- Add `set` key for transformations/filters
- Add `re.Match` group names
- Fix behavior for `expected_type` with `dict` key
- Raise for filter function signature mismatch in debug

Authored by: Grub4K
2 years ago
pukkandan 8b008d6254
[jsinterp] Support `if` statements
Closes #6131
2 years ago
Simon Sawicki 773c272d66
Fix config locations (#5933)
Bug in 8e40b9d1ec
Closes #5953

Authored by: Grub4k, coletdjnz, pukkandan
2 years ago