about summary refs log tree commit diff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* [test/test_download] Support 'playlist_maxcount:count' expected valuedirkf8 days1-1/+13
| | | | | | * parallel to `playlist_mincount' * specify both for a range of playlist lengths * if max < min the test will always fail!
* [external/FFmpeg] Fix and improve --ffmpeg-location handlingdirkf2024-03-271-1/+15
| | | | | | | | * pass YoutubeDL (FileDownloader) to FFmpegPostProcessor constructor * consolidate path search in FFmpegPostProcessor * make availability of FFmpegFD depend on existence of FFmpegPostProcessor * detect ffmpeg executable on instantiation of FFmpegFD * resolves #32735
* [utils] Let int_or_none() accept a base, like int()dirkf2024-03-081-0/+3
|
* [utils] Handle user:pass in URLs (#28801)Hubert Hirtz2024-03-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | * Handle user:pass in URLs Fixes "nonnumeric port" errors when youtube-dl is given URLs with usernames and passwords such as: http://username:password@example.com/myvideo.mp4 Refs: - https://en.wikipedia.org/wiki/Basic_access_authentication - https://tools.ietf.org/html/rfc1738#section-3.1 - https://docs.python.org/3.8/library/urllib.parse.html#urllib.parse.urlsplit Fixes #18276 (point 4) Fixes #20258 Fixes #26211 (see comment) * Align code with yt-dlp --------- Co-authored-by: dirkf <fieldhouse@gmx.net>
* [InfoExtractor] Support byte range for DASHdirkf2024-02-024-0/+484
| | | | | * adapted from https://github.com/ytdl-org/youtube-dl/pull/30279 * thx former GH user kikuyan
* [InfoExtractor] Support DASH subtitle extraction (yt-dlp back-port)dirkf2024-02-021-5/+108
|
* [YouTube] Fix `like_count` extraction using `likeButtonViewModel`dirkf2024-01-221-0/+1
| | | | | * also fix various tests * TODO: check against yt-dlp tests
* [compat] Rework compat for `method` parameter of ↵dirkf2024-01-221-0/+14
| | | | | | | `compat_urllib_request.Request` constructor * fixes #32573 * does not break `utils.HEADrequest` (eg)
* [utils] Revert bbd3e7e, updating docstring, test insteaddirkf2023-09-031-24/+22
|
* [test] Remove redundancy from lambda expected value regexdirkf2023-09-031-1/+1
|
* [utils] Rework URL path munging for ., .. componentsdirkf2023-07-292-1/+42
| | | | | | * move processing to YoutubeDLHandler * also process `Location` header for redirect * use tests from https://github.com/yt-dlp/yt-dlp/pull/7662
* [utils] Rework decoding of `Content-Encoding`sdirkf2023-07-291-13/+3
| | | | | | | | | | * 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
* [compat] Use `compat_open()`dirkf2023-07-258-33/+40
|
* [build] Add and use `devscripts/utils`dirkf2023-07-251-4/+6
|
* [utils] Fix update_Request() with empty data (not None)dirkf2023-07-251-0/+13
|
* [test/test_execution.py] Use `compat_subprocess_get_DEVNULL()`dirkf2023-07-251-5/+2
|
* [build] Fix various Jython CI and test issuesdirkf2023-07-251-4/+9
|
* [InfoExtractor] Add search methods for Next/Nuxt.js from yt-dlpdirkf2023-07-191-5/+106
| | | | | | | | | | | | * 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 https://github.com/yt-dlp/yt-dlp/commit/222a230871fe4fe63f35c49590379c9a77116819, thanks Lesmiscore * update extractors in PR using above, fix tests.
* [utils] Improve js_to_json, align with yt-dlpdirkf2023-07-191-4/+99
| | | | | | | | | | * 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)
* [utils] Align traverse_obj() with yt-dlpdirkf2023-07-191-16/+21
| | | | | | | | | 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 https://github.com/yt-dlp/yt-dlp/commit/776995bc109c5cd1aa56b684fada2ce718a386ec, 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
* [test] Fixes for old Pythonsdirkf2023-07-183-4/+15
|
* [downloader/external] Fix cookie supportbashonly2023-07-181-6/+149
|
* [core] Process header cookies on loadingSimon Sawicki2023-07-182-5/+194
|
* [core] Remove `Cookie` header on redirect to prevent leaksdirkf2023-07-181-2/+30
| | | | | Adated from yt-dlp/yt-dlp-ghsa-v8mc-9377-rwjj/pull/1/commits/101caac Thx coletdjnz
* [core] Update redirect handling from yt-dlpdirkf2023-07-181-49/+440
| | | | | * Thx coletdjnz: https://github.com/yt-dlp/yt-dlp/pull/7094 * add test that redirected `POST` loses its `Content-Type`
* [test] Make skipped tests in test_execution work with Py 2.6dirkf2023-07-181-4/+7
|
* [core] Align error reporting methods with yt-dlpdirkf2023-07-182-9/+4
|
* [utils] Add {expected_type} and Iterable support to traverse_obj()dirkf2023-07-181-29/+124
|
* [Misc] Fixes for 2.6 compatibilitydirkf2023-07-052-5/+7
|
* [workflows/ci.yml] Fix test support for Py 2.6dirkf2023-07-051-8/+8
|
* [workflows/ci.yml] Restore test support for Py 3.2dirkf2023-07-052-2/+7
|
* [YouTube] Improve nsig function name extractionpukkandan2023-06-221-8/+3
| | | | | | | Fixes player b7910ca8, using `,` vs `;` See https://github.com/ytdl-org/youtube-dl/issues/32292#issuecomment-1602231170 Co-authored-by: dirkf
* [YouTube] Fix `KeyError QV` in signature extraction faileddirkf2023-06-171-1/+6
| | | | | | * temporarily force missing global definition into sig JS * improve test: thanks https://github.com/yt-dlp/yt-dlp/issues/7327#issuecomment-1595274615 * resolves #32314
* [jsinterp] Fix div bug breaking player 8c7583ffdirkf2023-06-112-0/+53
| | | | | Thx bashonly: https://github.com/ytdl-org/youtube-dl/issues/32292#issuecomment-1585639223 Fixes #32292
* [jsinterp] Small updates for a85a875dirkf2023-05-232-0/+11
| | | | | * update signature tests * clarify NaN handling
* [jsinterp] Handle NaN in bitwise operatorsdirkf2023-05-111-0/+11
| | | | | * also add _NaN * also pull function naming from yt-dlp
* [jsinterp] Minimally handle arithmetic operator precedencedirkf2023-04-211-0/+11
| | | | Resolves #32066
* [utils] Ensure `allow_types` for `variadic()` is a tupledirkf2023-03-191-0/+1
|
* [downloader/http] Only check for resumability when actually resumingdirkf2023-03-191-1/+1
|
* [jsinterp] Fix regexp parsing and .replace[All] methoddirkf2023-03-071-10/+36
| | | | | * For performance, make regexp object instantiation lazy * Other small performance improvements
* [jsinterp] Handle `Date` at epoch 0pukkandan2023-03-031-0/+4
| | | | See yt-dlp/yt_dlp#6400
* [test] Support test-case with volatile ID (eg live show)dirkf2023-02-241-0/+9
| | | | Signalled by regexp ID value, eg: `'id': r're:[\da-zA-Z_-]{8,}'`
* Escape URLs in `sanitized_Request`, not `sanitize_url` ↵pukkandan2023-02-201-0/+1
| | | | 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.
* [test] Avoid name TestIE which causes a pytest warningdirkf2023-02-141-2/+2
| | | | See: https://github.com/yt-dlp/yt-dlp/commit/060ac76257a8c1f7370a8a571821c1d73377701f
* [InfoExtractor] Handle unquoted values in OpenGraph searchesdirkf2023-02-141-0/+2
|
* [feat]: Add support to external downloader aria2p (#31500)teddy1712023-02-134-24/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* [YouTube] Refresh compat/utils usagedirkf2023-02-131-5/+7
| | | | | | | * import parse_qs() * import parse_qs in lazy_extractors (clears old TODO) * clean up old compiled lazy_extractors for Py2 * use update_url()
* [compat] Update test_compatdirkf2023-02-131-2/+2
| | | | [skip ci]
* [compat] Systematise compat_ namingdirkf2023-02-131-1/+2
| | | | [skip ci]
* [test] Fix TestAgeRestrictiondirkf2023-02-131-4/+8
| | | | | * age restriction may cause DownloadError * update obsolete test URLs [skip ci]