Commit Graph

282 Commits

Author SHA1 Message Date
Simon Sawicki a71b812f53
[utils] `js_to_json`: Improve escape handling (#5217)
Authored by: Grub4K
2022-10-13 01:52:17 +05:30
Matthew 4c9a1a3ba5
[extractor/wordpress:mb.miniAudioPlayer] Add embed extractor (#5087)
Closes https://github.com/yt-dlp/yt-dlp/issues/4994

Authored by: coletdjnz
2022-10-09 05:55:26 +00:00
Simon Sawicki 7b0127e1e1
[utils] `traverse_obj`: Allow `re.Match` objects (#5174)
Authored by: Grub4K
2022-10-09 07:01:37 +05:30
Simon Sawicki f99bbfc983
[utils] `traverse_obj`: Always return list when branching (#5170)
Fixes #5162
Authored by: Grub4K
2022-10-09 06:57:32 +05:30
Simon Sawicki ab029d7e92
[utils] `traverse_obj`: Rewrite, document and add tests (#5024)
Authored by: Grub4K
2022-09-26 02:33:19 +05:30
Elyse 7657ec7ed6
[utils] `base_url`: URL paths can contain `&` (#4841)
Authored by: elyse0
Closes #4187
2022-09-04 08:39:45 +05:30
pukkandan 8f53dc44a0
[jsinterp] Handle new youtube signature functions
Closes #4635
2022-08-14 05:12:32 +05:30
pukkandan 97d9c79e92
Fix tests for 989a01c261 2022-08-05 00:07:05 +05:30
Lauren N. Liberda fc61aff41b
Determine merge container better (See desc) (#1482)
* 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
2022-08-04 06:12:12 +05:30
nixxo 47304e07dc
[extractor/rai] Add raisudtirol extractor (#4524)
Closes #4206
Authored by: nixxo
2022-08-02 00:55:48 +05:30
pukkandan 88f60feb32
Fix a904a7f8c6 2022-07-15 21:45:05 +05:30
Lesmiscore a904a7f8c6
Allow users to specify encoding in each config files (#4357)
Authored by: Lesmiscore
2022-07-15 20:52:14 +09:00
pukkandan f5ea47488a
[cleanup] Minor fixes 2022-07-11 02:24:36 +05:30
pukkandan 54007a45f1
[cleanup] Consistent style for file heads 2022-06-25 00:08:58 +05:30
pukkandan ac66811112
[compat] Remove more functions
Removing any more will require changes to a large number of extractors
2022-06-25 00:08:55 +05:30
pukkandan 0f06bcd759
[cleanup] Minor fixes (See desc)
* [youtube] Fix `--youtube-skip-dash-manifest`
* [build] Use `$()` in `Makefile`. Closes #3684
* Fix bug in 385ffb467b
* Fix bug in 43d7f5a5d0
* [cleanup] Remove unnecessary `utf-8` from `str.encode`/`bytes.decode`
* [utils] LazyList: Expose unnecessarily "protected" attributes
and other minor cleanup
2022-05-09 17:59:26 +05:30
pukkandan 19a0394044
[cleanup] Misc cleanup and refactor (#2173) 2022-04-18 02:28:28 +05:30
pukkandan f82711587c
[cleanup] Sort imports
Using https://github.com/PyCQA/isort

    isort -m VERTICAL_HANGING_INDENT --py 36 -l 80 --rr -n --tc .
2022-04-12 05:32:52 +05:30
pukkandan 86e5f3ed2e
[cleanup] Upgrade syntax
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
2022-04-12 05:32:51 +05:30
felix cfb0511d82
[cleanup] Remove unused code paths (#2173)
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
2022-04-12 05:32:50 +05:30
pukkandan b506289fe2
[test] Add `test_locked_file` 2022-04-07 12:05:44 +05:30
coletdev 1c1b2f96ae
[youtube:tab] Fix duration extraction for shorts (#3171)
Related: https://github.com/TeamNewPipe/NewPipe/issues/8034
Authored-by: coletdjnz
2022-03-28 00:49:42 +00:00
pukkandan 5c3895fff1
[outtmpl] Limit changes during sanitization
Closes #2761
2022-03-27 11:18:35 +05:30
s0u1h eeb2a770f3
[utils] `format_decimal_suffix`: Fix for very large numbers (#3109)
Authored by: s0u1h
2022-03-18 14:03:09 -07:00
pukkandan 28469edd7d
Release 2022.02.03 2022-02-03 23:14:46 +05:30
pukkandan 8bd1c00bf3
[utils] Handle `ss:xxx` in `parse_duration`
Closes #2388
2022-01-19 18:57:29 +05:30
Zenon Mousmoulas 0254f16274
[utils] Improve `get_elements_text_and_html_by_attribute` regex (#2280)
Authored by: zmousm, pukkandan
2022-01-09 23:44:56 +05:30
Zenon Mousmoulas 6f32a0b5b7
[utils] Improve parsing for nested HTML elements (#2129)
and add functions to return the HTML of elements

Authored by: zmousm
2022-01-06 00:07:49 +05:30
pukkandan 06e57990f7
Allow multiple and nested configuration files 2022-01-04 00:26:58 +05:30
Pierre Mdawar f02d24d8d2
[utils] Fix `format_bytes` output for Bytes (#2132)
Authored by: pukkandan, mdawar
2021-12-28 03:42:19 +05:30
pukkandan 352d5da812
[utils] Improve `parse_count` 2021-12-25 04:07:19 +05:30
pukkandan 282f570918
[utils] Fix error when copying `LazyList` 2021-11-20 08:33:55 +05:30
pukkandan c5e3f84972
[utils] Allow alignment in `render_table`
and add tests
2021-11-20 08:33:51 +05:30
Damiano Amatruda 17ec8bcfa9
[microsoftstream] Add extractor (#1201)
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
2021-10-22 05:34:00 +05:30
pukkandan aa7785f860
[utils] Standardize timestamp formatting code
Closes #1285
2021-10-19 22:58:25 +05:30
pukkandan 176f1866cb
Add HDR information to formats 2021-10-18 18:35:02 +05:30
pukkandan 18f96d129b
[utils] Allow duration strings in filter
Closes #1309
2021-10-17 17:39:33 +05:30
pukkandan 4dfbf8696b
[utils] Add `parse_qs` 2021-08-23 00:50:43 +05:30
pukkandan 8f18aca871
Let `--match-filter` reject entries early
Makes redundant: `--match-title`, `--reject-title`, `--min-views`, `--max-views`
2021-08-17 04:29:56 +05:30
pukkandan a047eeb6d2
Add regex to `--match-filter`
This does not fully deprecate `--match-title`/`--reject-title`
since `--match-filter` is only checked after the extraction is complete,
while `--match-title` can often be checked from the flat playlist.

Fixes: https://github.com/ytdl-org/youtube-dl/issues/9092, https://github.com/ytdl-org/youtube-dl/issues/23035
2021-08-05 04:10:26 +05:30
Max Teegen 77b87f0519 Add all format filtering operators also to `--match-filter`
PR: https://github.com/ytdl-org/youtube-dl/pull/27361

Authored by: max-te
2021-08-05 03:37:20 +05:30
pukkandan e0f2b4b47d
[utils] Fix slicing of reversed `LazyList`
Closes #589
2021-08-01 12:13:40 +05:30
felix c843e68588
[utils] Improve `js_to_json` comment regex
Capture the newline character as part of a single-line comment

From #497, Authored by: fstirlitz
2021-07-14 05:02:43 +05:30
pukkandan 981052c9c6 Some minor fixes and refactoring (see desc)
* [utils] Fix issues with reversal
* check_formats should catch `DownloadError`, not `ExtractorError`
* Simplify format selectors with `LazyList` and `yield from`
2021-07-02 08:17:37 +05:30
pukkandan 28419ca2c8
[utils] Improve `LazyList`
* Add `repr` and `str` that mimics `list`
* Add `reversed`. Unlike `[::-1]`, reversed does not exhaust the iterable and modifies the `LazyList` in-place
* Add tests
2021-06-13 03:45:53 +05:30
pukkandan 639f1cea92
Fix `%d` and empty default in outtmpl
Closes #388
2021-06-09 15:37:15 +05:30
felix cc52de4356
[cleanup] Point all shebang to `python3` (#372)
Authored by: fstirlitz
2021-06-06 00:59:04 +05:30
pukkandan bc6b9bcd65
[utils] Escape URLs in `sanitized_Request`, not `sanitize_url`
d2558234cf added escaping of URLs while sanitizing. However, `sanitize_url` may not always receive an actual URL.
Eg: When using `yt-dlp "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.
2021-06-01 20:29:02 +05:30
Hubert Hirtz 5435dcf96e
Handle Basic Auth `user:pass` in URLs
Fixes https://github.com/ytdl-org/youtube-dl/issues/20258, https://github.com/ytdl-org/youtube-dl/issues/26211
Authored by: hhirtz, pukkandan
2021-05-24 03:38:02 +05:30
colethedj 9e62f283ff
[utils] Add `datetime_from_str` to parse relative time (#221)
and `datetime_add_months` to accurately add/subtract months

Authored by: colethedj
2021-04-07 17:09:06 +05:30