aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* [utils] HTTPHeaderDict: Handle byte valuespukkandan2023-07-301-0/+2
|
* [networking] Remove dot segments during URL normalization (#7662)coletdjnz2023-07-281-9/+33
| | | | | | | This implements RFC3986 5.2.4 remove_dot_segments during the URL normalization process. Closes #3355, #6526 Authored by: coletdjnz
* [utils] Improve `parse_duration`bashonly2023-07-201-0/+2
| | | | Authored by: bashonly
* [networking] Rewrite architecture (#2861)coletdjnz2023-07-151-8/+38
| | | | | | | | | | | | | | | | 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
* [networking] Add module (#2861)pukkandan2023-07-151-9/+9
| | | | No actual changes - code is only moved around
* [utils] `clean_podcast_url`: Handle more trackers (#7556)Mahmoud Abdel-Fattah2023-07-111-0/+2
| | | | Authored by: mabdelfattah, bashonly Closes #7544
* Update to ytdl-commit-d1c6c5pukkandan2023-05-241-0/+32
| | | | | | | | | | | [YouTube] [core] Improve platform debug log, based on yt-dlp https://github.com/ytdl-org/youtube-dl/commit/d1c6c5c4d618fa950813c0c71aede34a5ac851e9 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
* [utils] `traverse_obj`: More fixes (#6959)Simon Sawicki2023-04-301-2/+19
| | | | | | | | - Fix result when branching with `traverse_string` - Fix `slice` path on `dict`s - Fix tests and docstrings from 21b5ec86c2c37d10c5bb97edd7051d3aac16bb3e - Add `is_iterable_like` helper function Authored by: Grub4K
* [utils] `traverse_obj`: Allow iterables in traversal (#6902)Simon Sawicki2023-04-241-0/+4
| | | Authored by: Grub4K
* [utils] `js_to_json`: Implement template strings (#6623)Simon Sawicki2023-03-251-0/+7
| | | Authored by: Grub4K
* [utils] `traverse_obj`: Fix more bugsSimon Sawicki2023-02-101-27/+48
| | | | | | and cleanup uses of `default=[]` Continued from b1bde57bef878478e3503ab07190fd207914ade9
* [utils] `traverse_obj`: Fix several behavioral problemsSimon Sawicki2023-02-081-16/+27
| | | | | See #6180 for further info Authored by: Grub4K
* [utils] `traverse_obj`: Various improvementsSimon Sawicki2023-02-021-0/+40
| | | | | | | | - 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
* Add `weba` to known extensionspukkandan2022-12-301-0/+2
|
* [utils] js_to_json: Fix bug in f55523c (#5771)ChillingPepper2022-12-301-0/+79
| | | Authored by: ChillingPepper, pukkandan
* [utils] `js_to_json`: Improve escape handling (#5217)Simon Sawicki2022-10-131-0/+6
| | | Authored by: Grub4K
* [extractor/wordpress:mb.miniAudioPlayer] Add embed extractor (#5087)Matthew2022-10-091-0/+3
| | | | | Closes https://github.com/yt-dlp/yt-dlp/issues/4994 Authored by: coletdjnz
* [utils] `traverse_obj`: Allow `re.Match` objects (#5174)Simon Sawicki2022-10-091-0/+20
| | | Authored by: Grub4K
* [utils] `traverse_obj`: Always return list when branching (#5170)Simon Sawicki2022-10-091-4/+23
| | | | Fixes #5162 Authored by: Grub4K
* [utils] `traverse_obj`: Rewrite, document and add tests (#5024)Simon Sawicki2022-09-261-0/+187
| | | Authored by: Grub4K
* [utils] `base_url`: URL paths can contain `&` (#4841)Elyse2022-09-041-0/+1
| | | | Authored by: elyse0 Closes #4187
* [jsinterp] Handle new youtube signature functionspukkandan2022-08-141-0/+4
| | | | Closes #4635
* Fix tests for 989a01c2610832193c268d072ada8814bfd4c00dpukkandan2022-08-051-5/+5
|
* Determine merge container better (See desc) (#1482)Lauren N. Liberda2022-08-041-0/+26
| | | | | | | | * Determine the container early. Closes #4069 * Use codecs instead of just file extensions * Obey `--prefer-free-formats` * Allow fallbacks in `--merge-output` Authored by: pukkandan, selfisekai
* [extractor/rai] Add raisudtirol extractor (#4524)nixxo2022-08-021-0/+1
| | | | Closes #4206 Authored by: nixxo
* Fix a904a7f8c6edc42046f0a78fb279739d500d4887pukkandan2022-07-151-14/+6
|
* Allow users to specify encoding in each config files (#4357)Lesmiscore2022-07-151-0/+28
| | | Authored by: Lesmiscore
* [cleanup] Minor fixespukkandan2022-07-111-1/+1
|
* [cleanup] Consistent style for file headspukkandan2022-06-251-2/+2
|
* [compat] Remove more functionspukkandan2022-06-251-10/+7
| | | | Removing any more will require changes to a large number of extractors
* [cleanup] Minor fixes (See desc)pukkandan2022-05-091-1/+1
| | | | | | | | | | * [youtube] Fix `--youtube-skip-dash-manifest` * [build] Use `$()` in `Makefile`. Closes #3684 * Fix bug in 385ffb467b2285e85a2a5495b90314ba1f8e0700 * Fix bug in 43d7f5a5d0c77556156a3f8caa6976d3908a1e38 * [cleanup] Remove unnecessary `utf-8` from `str.encode`/`bytes.decode` * [utils] LazyList: Expose unnecessarily "protected" attributes and other minor cleanup
* [cleanup] Misc cleanup and refactor (#2173)pukkandan2022-04-181-8/+14
|
* [cleanup] Sort importspukkandan2022-04-121-47/+48
| | | | | | Using https://github.com/PyCQA/isort isort -m VERTICAL_HANGING_INDENT --py 36 -l 80 --rr -n --tc .
* [cleanup] Upgrade syntaxpukkandan2022-04-121-13/+8
| | | | | | | | | | Using https://github.com/asottile/pyupgrade 1. `__future__` imports and `coding: utf-8` were removed 2. Files were rewritten with `pyupgrade --py36-plus --keep-percent-format` 3. f-strings were cherry-picked from `pyupgrade --py36-plus` Extractors are left untouched (except removing header) to avoid unnecessary merge conflicts
* [cleanup] Remove unused code paths (#2173)felix2022-04-121-3/+0
| | | | | | | | | | | | | | | | | | | Notes: * `_windows_write_string`: Fixed in 3.6 * https://bugs.python.org/issue1602 * PEP: https://www.python.org/dev/peps/pep-0528 * Windows UTF-8 fix: Fixed in 3.3 * https://bugs.python.org/issue13216 * `__loader__`: is always present in 3.3+ * https://bugs.python.org/issue14646 * `workaround_optparse_bug9161`: Fixed in 2.7 * https://bugs.python.org/issue9161 Authored by: fstirlitz
* [test] Add `test_locked_file`pukkandan2022-04-071-0/+31
|
* [youtube:tab] Fix duration extraction for shorts (#3171)coletdev2022-03-281-0/+2
| | | | Related: https://github.com/TeamNewPipe/NewPipe/issues/8034 Authored-by: coletdjnz
* [outtmpl] Limit changes during sanitizationpukkandan2022-03-271-2/+4
| | | | Closes #2761
* [utils] `format_decimal_suffix`: Fix for very large numbers (#3109)s0u1h2022-03-181-0/+1
| | | Authored by: s0u1h
* Release 2022.02.03pukkandan2022-02-031-1/+1
|
* [utils] Handle `ss:xxx` in `parse_duration`pukkandan2022-01-191-0/+2
| | | | Closes #2388
* [utils] Improve `get_elements_text_and_html_by_attribute` regex (#2280)Zenon Mousmoulas2022-01-091-3/+3
| | | Authored by: zmousm, pukkandan
* [utils] Improve parsing for nested HTML elements (#2129)Zenon Mousmoulas2022-01-061-15/+92
| | | | | and add functions to return the HTML of elements Authored by: zmousm
* Allow multiple and nested configuration filespukkandan2022-01-041-0/+10
|
* [utils] Fix `format_bytes` output for Bytes (#2132)Pierre Mdawar2021-12-281-0/+13
| | | | Authored by: pukkandan, mdawar
* [utils] Improve `parse_count`pukkandan2021-12-251-0/+7
|
* [utils] Fix error when copying `LazyList`pukkandan2021-11-201-5/+5
|
* [utils] Allow alignment in `render_table`pukkandan2021-11-201-1/+38
| | | | and add tests
* [microsoftstream] Add extractor (#1201)Damiano Amatruda2021-10-221-2/+5
| | | | | Based on: https://github.com/ytdl-org/youtube-dl/pull/24649 Fixes: https://github.com/ytdl-org/youtube-dl/issues/24440 Authored by: damianoamatruda, nixklai
* [utils] Standardize timestamp formatting codepukkandan2021-10-191-4/+4
| | | | Closes #1285