dirkf
4eaeb9b2c6
[InfoExtractor] Support byte range for DASH
...
* adapted from https://github.com/ytdl-org/youtube-dl/pull/30279
* thx former GH user kikuyan
10 months ago
dirkf
c58b655a9e
[InfoExtractor] Support DASH subtitle extraction (yt-dlp back-port)
10 months ago
dirkf
dc512e3a8a
[YouTube] Fix `like_count` extraction using `likeButtonViewModel`
...
* also fix various tests
* TODO: check against yt-dlp tests
10 months ago
dirkf
6651871416
[compat] Rework compat for `method` parameter of `compat_urllib_request.Request` constructor
...
* fixes #32573
* does not break `utils.HEADrequest` (eg)
10 months ago
dirkf
66ab0814c4
[utils] Revert bbd3e7e
, updating docstring, test instead
1 year ago
dirkf
21caaf2380
[test] Remove redundancy from lambda expected value regex
1 year ago
dirkf
abef53466d
[utils] Rework URL path munging for ., .. components
...
* move processing to YoutubeDLHandler
* also process `Location` header for redirect
* use tests from https://github.com/yt-dlp/yt-dlp/pull/7662
1 year ago
dirkf
e7926ae9f4
[utils] Rework decoding of `Content-Encoding`s
...
* support nested encodings
* support optional `br` encoding, if brotli package is installed
* support optional 'compress' encoding, if ncompress package is installed
* response `Content-Encoding` has only unprocessed encodings, or removed
* response `Content-Length` is decoded length (usable for filesize metadata)
* use zlib for both deflate and gzip decompression
* some elements taken from yt-dlp: thx especially coletdjnz
1 year ago
dirkf
a25e9f3c84
[compat] Use `compat_open()`
1 year ago
dirkf
aac33155e4
[build] Add and use `devscripts/utils`
1 year ago
dirkf
2b7dd3b2a2
[utils] Fix update_Request() with empty data (not None)
1 year ago
dirkf
44faa71b19
[test/test_execution.py] Use `compat_subprocess_get_DEVNULL()`
1 year ago
dirkf
7bce2ad441
[build] Fix various Jython CI and test issues
1 year ago
dirkf
b2741f2654
[InfoExtractor] Add search methods for Next/Nuxt.js from yt-dlp
...
* add _search_nextjs_data(), from https://github.com/yt-dlp/yt-dlp/pull/1386
thanks selfisekai
* add _search_nuxt_data(), from https://github.com/yt-dlp/yt-dlp/pull/1921 ,
thanks Lesmiscore, pukkandan
* add tests for the above
* also fix HTML5 type recognition and tests, from
222a230871
,
thanks Lesmiscore
* update extractors in PR using above, fix tests.
1 year ago
dirkf
d9d07a9581
[utils] Improve js_to_json, align with yt-dlp
...
* support variable substitution, from https://github.com/yt-dlp/yt-dlp/pull/#521 etc,
thanks ChillingPepper, Grub4k, pukkandan
* improve escape handling, from https://github.com/yt-dlp/yt-dlp/pull/#521
thanks Grub4k
* support template strings from https://github.com/yt-dlp/yt-dlp/pull/6623
thanks Grub4k
* add limited `!` evaluation (eg, !!0 -> false, see tests)
1 year ago
dirkf
825a40744b
[utils] Align traverse_obj() with yt-dlp
...
Thanks Grub4k for these:
* traverse `Iterable`s, from https://github.com/yt-dlp/yt-dlp/pull/6902 , etc
* traverse `set` key for transformations/filters, `re.Match` group names, from
776995bc10
, etc
* traverse `re.Match`es, from https://github.com/yt-dlp/yt-dlp/pull/5174
* always return list when branching, from https://github.com/yt-dlp/yt-dlp/pull/5170
1 year ago
dirkf
1d8d5a93f7
[test] Fixes for old Pythons
1 year ago
bashonly
21438a4194
[downloader/external] Fix cookie support
1 year ago
Simon Sawicki
8334ec961b
[core] Process header cookies on loading
1 year ago
dirkf
b383be9887
[core] Remove `Cookie` header on redirect to prevent leaks
...
Adated from yt-dlp/yt-dlp-ghsa-v8mc-9377-rwjj/pull/1/commits/101caac
Thx coletdjnz
1 year ago
dirkf
46fde7caee
[core] Update redirect handling from yt-dlp
...
* Thx coletdjnz: https://github.com/yt-dlp/yt-dlp/pull/7094
* add test that redirected `POST` loses its `Content-Type`
1 year ago
dirkf
1720c04dc5
[test] Make skipped tests in test_execution work with Py 2.6
1 year ago
dirkf
d5ef405c5d
[core] Align error reporting methods with yt-dlp
1 year ago
dirkf
f47fdb9564
[utils] Add {expected_type} and Iterable support to traverse_obj()
1 year ago
dirkf
f24bc9272e
[Misc] Fixes for 2.6 compatibility
1 year ago
dirkf
b08a580906
[workflows/ci.yml] Fix test support for Py 2.6
1 year ago
dirkf
2500300c2a
[workflows/ci.yml] Restore test support for Py 3.2
1 year ago
pukkandan
9112e668a5
[YouTube] Improve nsig function name extraction
...
Fixes player b7910ca8, using `,` vs `;`
See https://github.com/ytdl-org/youtube-dl/issues/32292#issuecomment-1602231170
Co-authored-by: dirkf
1 year ago
dirkf
ae8ba2c319
[YouTube] Fix `KeyError QV` in signature extraction failed
...
* temporarily force missing global definition into sig JS
* improve test: thanks https://github.com/yt-dlp/yt-dlp/issues/7327#issuecomment-1595274615
* resolves #32314
1 year ago
dirkf
a2534f7b88
[jsinterp] Fix div bug breaking player 8c7583ff
...
Thx bashonly: https://github.com/ytdl-org/youtube-dl/issues/32292#issuecomment-1585639223
Fixes #32292
1 year ago
dirkf
d89c2137ba
[jsinterp] Small updates for a85a875
...
* update signature tests
* clarify NaN handling
2 years ago
dirkf
a85a875fef
[jsinterp] Handle NaN in bitwise operators
...
* also add _NaN
* also pull function naming from yt-dlp
2 years ago
dirkf
211cbfd5d4
[jsinterp] Minimally handle arithmetic operator precedence
...
Resolves #32066
2 years ago
dirkf
f35b757c82
[utils] Ensure `allow_types` for `variadic()` is a tuple
2 years ago
dirkf
45495228b7
[downloader/http] Only check for resumability when actually resuming
2 years ago
dirkf
0402710227
[jsinterp] Fix regexp parsing and .replace[All] method
...
* For performance, make regexp object instantiation lazy
* Other small performance improvements
2 years ago
pukkandan
3e92c60fcd
[jsinterp] Handle `Date` at epoch 0
...
See yt-dlp/yt_dlp#6400
2 years ago
dirkf
e67e52a8f8
[test] Support test-case with volatile ID (eg live show)
...
Signalled by regexp ID value, eg: `'id': r're:[\da-zA-Z_-]{8,}'`
2 years ago
pukkandan
1d3751c3fe
Escape URLs in `sanitized_Request`, not `sanitize_url` d2558234cf5dd12d6896eed5427b7dcdb3ab7b5a added escaping of URLs while sanitizing. However, `sanitize_url` may not always receive an actual URL. Eg: When using `youtube-dl "search query" --default-search ytsearch`, `search query` gets escaped to `search%20query` before being prefixed with `ytsearch:` which is not the intended behavior. So the escaping is moved to `sanitized_Request` instead.
2 years ago
dirkf
dd9aa74bee
[test] Avoid name TestIE which causes a pytest warning
...
See: 060ac76257
2 years ago
dirkf
42b098dd79
[InfoExtractor] Handle unquoted values in OpenGraph searches
2 years ago
teddy171
33db85c571
[feat]: Add support to external downloader aria2p ( #31500 )
...
* feat: add class Aria2pFD
* feat: create call_downloader function
* feat: a colorful download interface to aria2pFD
* feat: change value name
* Apply suggestions from code review
Co-authored-by: dirkf <fieldhouse@gmx.net>
* Typo in suggestion
* fix: remove unused value
* fix: add not function to return value(0 is normal); add total_seconds to download.eta(timedelta object); add waiting status when hook progress
* fix: remove unuse method ..utils.format_bytes
* fix: be up to flake8
* fix: be up to flake8
* Apply suggestions from code review
* [feat] test external downloader aria2p
* [feat] test external downloader aria2p
* [fix] test_external_downloader.py
* Apply suggestions from code review
Co-authored-by: dirkf <fieldhouse@gmx.net>
* Apply suggestions from code review
Co-authored-by: dirkf <fieldhouse@gmx.net>
* Update test/test_external_downloader.py
Co-authored-by: dirkf <fieldhouse@gmx.net>
* Update test/test_external_downloader.py
Co-authored-by: dirkf <fieldhouse@gmx.net>
* Update youtube_dl/downloader/external.py
Co-authored-by: dirkf <fieldhouse@gmx.net>
* refactoring code and fix bugs
* Apply suggestions from code review
* Rename test_external_downloader.py to test_downloader_external.py
---------
Co-authored-by: dirkf <fieldhouse@gmx.net>
2 years ago
dirkf
bafb6dec72
[YouTube] Refresh compat/utils usage
...
* import parse_qs()
* import parse_qs in lazy_extractors (clears old TODO)
* clean up old compiled lazy_extractors for Py2
* use update_url()
2 years ago
dirkf
4e04f10499
[compat] Update test_compat
...
[skip ci]
2 years ago
dirkf
249f2b6316
[compat] Systematise compat_ naming
...
[skip ci]
2 years ago
dirkf
d6b14ba316
[test] Fix TestAgeRestriction
...
* age restriction may cause DownloadError
* update obsolete test URLs
[skip ci]
2 years ago
dirkf
295736c9cb
[jsinterp] Improve parsing
...
* support subset `... else if ...`
* support `while`
* add `RegExp` class
* generalise `new` support
* limited more debug strings
* matching test changes
2 years ago
pukkandan
14ef89a8da
Support `if` statements
...
Fix for yt-dlp/yt_dlp#6131
Closes #31509
2 years ago
Andrei Lebedev
27ed77aabb
[utils] Backport traverse_obj (etc) from yt-dlp ( #31156 )
...
* Backport traverse_obj and closely related function from yt-dlp (code by pukkandan)
* Backport LazyList, variadic(), try_call (code by pukkandan)
* Recast using yt-dlp's newer traverse_obj() implementation and tests (code by grub4k)
* Add tests for Unicode case folding support matching Py3.5+ (requires f102e3d
)
* Improve/add tests for variadic, try_call, join_nonempty
Co-authored-by: dirkf <fieldhouse@gmx.net>
2 years ago
dirkf
087ddc2371
[compat] Add test for compat_casefold()
2 years ago