Commit Graph

282 Commits (7991ae57a800316930e20a15df8314616c5cba8f)

Author SHA1 Message Date
Simon Sawicki a71b812f53
[utils] `js_to_json`: Improve escape handling ()
Authored by: Grub4K
Matthew 4c9a1a3ba5
[extractor/wordpress:mb.miniAudioPlayer] Add embed extractor ()
Closes https://github.com/yt-dlp/yt-dlp/issues/4994

Authored by: coletdjnz
Simon Sawicki 7b0127e1e1
[utils] `traverse_obj`: Allow `re.Match` objects ()
Authored by: Grub4K
Simon Sawicki f99bbfc983
[utils] `traverse_obj`: Always return list when branching ()
Fixes 
Authored by: Grub4K
Simon Sawicki ab029d7e92
[utils] `traverse_obj`: Rewrite, document and add tests ()
Authored by: Grub4K
Elyse 7657ec7ed6
[utils] `base_url`: URL paths can contain `&` ()
Authored by: elyse0
Closes 
pukkandan 8f53dc44a0
[jsinterp] Handle new youtube signature functions
Closes 
pukkandan 97d9c79e92
Fix tests for 989a01c261
Lauren N. Liberda fc61aff41b
Determine merge container better (See desc) ()
* Determine the container early. Closes 
* Use codecs instead of just file extensions
* Obey `--prefer-free-formats`
* Allow fallbacks in `--merge-output`

Authored by: pukkandan, selfisekai
nixxo 47304e07dc
[extractor/rai] Add raisudtirol extractor ()
Closes 
Authored by: nixxo
pukkandan 88f60feb32
Fix a904a7f8c6
Lesmiscore a904a7f8c6
Allow users to specify encoding in each config files ()
Authored by: Lesmiscore
pukkandan f5ea47488a
[cleanup] Minor fixes
pukkandan 54007a45f1
[cleanup] Consistent style for file heads
pukkandan ac66811112
[compat] Remove more functions
Removing any more will require changes to a large number of extractors
pukkandan 0f06bcd759
[cleanup] Minor fixes (See desc)
* [youtube] Fix `--youtube-skip-dash-manifest`
* [build] Use `$()` in `Makefile`. Closes 
* 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
pukkandan 19a0394044
[cleanup] Misc cleanup and refactor ()
pukkandan f82711587c
[cleanup] Sort imports
Using https://github.com/PyCQA/isort

    isort -m VERTICAL_HANGING_INDENT --py 36 -l 80 --rr -n --tc .
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
felix cfb0511d82
[cleanup] Remove unused code paths ()
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
pukkandan b506289fe2
[test] Add `test_locked_file`
coletdev 1c1b2f96ae
[youtube:tab] Fix duration extraction for shorts ()
Related: https://github.com/TeamNewPipe/NewPipe/issues/8034
Authored-by: coletdjnz
pukkandan 5c3895fff1
[outtmpl] Limit changes during sanitization
Closes 
s0u1h eeb2a770f3
[utils] `format_decimal_suffix`: Fix for very large numbers ()
Authored by: s0u1h
pukkandan 28469edd7d
Release 2022.02.03
pukkandan 8bd1c00bf3
[utils] Handle `ss:xxx` in `parse_duration`
Closes 
Zenon Mousmoulas 0254f16274
[utils] Improve `get_elements_text_and_html_by_attribute` regex ()
Authored by: zmousm, pukkandan
Zenon Mousmoulas 6f32a0b5b7
[utils] Improve parsing for nested HTML elements ()
and add functions to return the HTML of elements

Authored by: zmousm
pukkandan 06e57990f7
Allow multiple and nested configuration files
Pierre Mdawar f02d24d8d2
[utils] Fix `format_bytes` output for Bytes ()
Authored by: pukkandan, mdawar
pukkandan 352d5da812
[utils] Improve `parse_count`
pukkandan 282f570918
[utils] Fix error when copying `LazyList`
pukkandan c5e3f84972
[utils] Allow alignment in `render_table`
and add tests
Damiano Amatruda 17ec8bcfa9
[microsoftstream] Add extractor ()
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
pukkandan aa7785f860
[utils] Standardize timestamp formatting code
Closes 
pukkandan 176f1866cb
Add HDR information to formats
pukkandan 18f96d129b
[utils] Allow duration strings in filter
Closes 
pukkandan 4dfbf8696b
[utils] Add `parse_qs`
pukkandan 8f18aca871
Let `--match-filter` reject entries early
Makes redundant: `--match-title`, `--reject-title`, `--min-views`, `--max-views`
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
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
pukkandan e0f2b4b47d
[utils] Fix slicing of reversed `LazyList`
Closes 
felix c843e68588
[utils] Improve `js_to_json` comment regex
Capture the newline character as part of a single-line comment

From , Authored by: fstirlitz
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`
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
pukkandan 639f1cea92
Fix `%d` and empty default in outtmpl
Closes 
felix cc52de4356
[cleanup] Point all shebang to `python3` ()
Authored by: fstirlitz
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.
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
colethedj 9e62f283ff
[utils] Add `datetime_from_str` to parse relative time ()
and `datetime_add_months` to accurately add/subtract months

Authored by: colethedj