pukkandan
2cb1982043
[utils] `locked_file`: Fix for PyPy on Windows
2 years ago
pukkandan
64fa820ccf
[cleanup] Misc fixes (see desc)
...
* [tvver] Fix bug in 6837633a4a
- Closes #4054
* [rumble] Fix tests - Closes #3976
* [make] Remove `cat` abuse - Closes #3989
* [make] Revert #3684 - Closes #3814
* [utils] Improve `get_elements_by_class` - Closes #3993
* [utils] Inherit `Namespace` from `types.SimpleNamespace`
* [utils] Use `re.fullmatch` for matching filters
* [jsinterp] Handle quotes in `_separate`
* [make_readme] Allow overshooting last line
Authored by: pukkandan, kwconder, MrRawes, Lesmiscore
2 years ago
pukkandan
56ba69e4c9
[cleanup] Misc fixes
...
Closes #4027
2 years ago
pukkandan
5ec1b6b716
Add option `--download-sections` to download video partially
...
Closes #52 , Closes #3932
2 years ago
pukkandan
b7c47b7438
[extractor] Add `_search_json`
...
All fetching of JSON objects should eventually be done with this function
but only `youtube` is being refactored for now
2 years ago
pukkandan
1890fc6389
[cleanup] Misc fixes
...
Cherry-picks from: #3498 , #3947
Related: #3949 , https://github.com/yt-dlp/yt-dlp/issues/1839#issuecomment-1140313836
Authored by: pukkandan, flashdagger, gamer191
2 years ago
coletdev
2c6dcb65fb
[utils] Send HTTP/1.1 ALPN extension ( #3889 )
...
Some servers may reject requests if not sent (e.g. fingerprinting)
Fixes #3878
Authored by: coletdjnz
3 years ago
pukkandan
8a82af3511
[cleanup] Misc fixes and cleanup
...
Closes #3780 , Closes #3853 , Closes #3850
3 years ago
pukkandan
6b9e832db7
`--config-location -` to provide options interactively
3 years ago
pukkandan
b5899f4f19
[build, cleanup] Refactor
...
Closes #3835 , #3837
3 years ago
pukkandan
c487cf0010
[cleanup] Misc
3 years ago
pukkandan
53973b4d2c
[utils] Fix bug in 0b9c08b47b
...
* Cache of `supports_terminal_sequences` must be reset after enabling VT mode
* and move `windows_enable_vt_mode` to utils to avoid cyclic imports
3 years ago
pukkandan
0b9c08b47b
[utils] Improve performance using `functools.cache`
...
Closes #3786
3 years ago
pukkandan
2f97cc615b
[utils] `ISO3166Utils`: Add `EU` and `AP`
...
Fixes https://github.com/yt-dlp/yt-dlp/pull/3302#discussion_r875528517
3 years ago
pukkandan
9e49146352
Add option `--alias`
3 years ago
pukkandan
21633673c3
[cleanup] Minor fixes
3 years ago
pukkandan
80e8493ee7
[utils] `is_html`: Handle double BOM
...
Closes #2885
3 years ago
pukkandan
7896214c42
Bugfix for 591bb9d355
...
Closes #3769
3 years ago
pukkandan
591bb9d355
Fix color in `-q -F`
...
and convert `ydl._out_files`/`ydl._allow_colors` to `Namespace`
Closes #3761
3 years ago
pukkandan
2414649192
[cleanup] Misc cleanup
3 years ago
pukkandan
82d020804d
[extractor] Use classmethod/property where possible
...
and refactor lazy extractors accordingly.
This reduces the need to create extractor instances
3 years ago
pukkandan
3d38b2d6d0
Fix `--date today`
...
Closes #3704
3 years ago
pukkandan
d76fa1f3d4
[cookies] Allow `cookiefile` to be a text stream
...
Closes #3674
3 years ago
pukkandan
fe1daad3cb
Bugfix for 59f943cd50
...
Fixes: 59f943cd50 (commitcomment-73251597)
3 years ago
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
3 years ago
pukkandan
4f28b537d9
Allow use of weaker ciphers with `--legacy-server-connect`
...
Closes #2043
3 years ago
coletdev
bb58c9ed5c
Add support for SSL client certificate authentication ( #3435 )
...
Adds `--client-certificate`, `--client-certificate-key`, `--client-certificate-password`
Authored-by: coletdjnz
Co-authored-by: df <fieldhouse@gmx.net>
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
3 years ago
coletdev
afac4caa7d
Fix redirect HTTP method handling ( #3577 )
...
Authored by: coletdjnz
3 years ago
Justin Keogh
131e14dc66
[utils] `locked_file`: Ignore illegal seek on `truncate` ( #3610 )
...
Closes #3557
Authored by: jakeogh
3 years ago
pukkandan
3fe75fdc80
[cleanup] Misc fixes (see desc)
...
* Do not warn when fixup is skipped for existing file
* [fragment] Fix `--skip-unavailable-fragments` for HTTP Errors
* [utils] write_string: Fix bug in 59f943cd50
* [utils] parse_codecs: Subtitle codec is generally referred to as `scodec`. https://github.com/yt-dlp/yt-dlp/pull/2174#discussion_r790156048
* [docs] Remove note about permissions. Closes #3597
3 years ago
pukkandan
6f7563beb7
[XAttrMetadata] Refactor and document dependencies
3 years ago
Lesmiscore
94aa064497
[utils] YoutubeDLCookieJar: Detect and reject JSON file ( #3599 )
...
Authored by: Lesmiscore
3 years ago
pukkandan
1d485a1a79
[cleanup] Misc fixes
...
Closes #3565 , https://github.com/yt-dlp/yt-dlp/issues/3514#issuecomment-1105944364
3 years ago
pukkandan
492272fed6
`--match-filter -` to interactively ask for each video
3 years ago
pukkandan
59f943cd50
[utils] `write_string`: Workaround newline issue in `conhost`
...
On windows `conhost`, when `WINDOWS_VT_MODE` is enabled, `\n` is not
actually sent if the window is exactly the length of printed line,
and the line does not end with a white-space character. So the
line-break disappears when resizing the window.
Fixes #1863
3 years ago
pukkandan
059bc4db19
[compat/asyncio] Use `asyncio.all_tasks`
3 years ago
pukkandan
9cd080508d
Revert acbc642250
...
Reverts "[utils] WebSocketsWrapper: Ignore warnings at websockets instantiation"
The warning should not be suppressed. We need to address it
3 years ago
Lesmiscore
acbc642250
[utils] WebSocketsWrapper: Ignore warnings at websockets instantiation
...
This also fixes crash caused by moving asyncio to .compat.
Authored by: Lesmiscore
Thanks: J.Chung at Discord (581418557871620106)
3 years ago
pukkandan
9b8ee23b99
[dependencies] Create module with all dependency imports
3 years ago
pukkandan
62f6f1cbf2
Don't imply `-s` for later stages of `-O`
3 years ago
pukkandan
1e9969f4f5
bugfix for a44ca5a470
, 19a0394044
, 77f9033095
...
Closes #3472
3 years ago
pukkandan
19a0394044
[cleanup] Misc cleanup and refactor ( #2173 )
3 years ago
pukkandan
abfecb7bc1
[utils] Fix WebSocketsWrapper
...
Bug in 3cea3edd1a
Closes #3422
3 years ago
pukkandan
b07897ef5b
[utils] certifi: Make sure the pem file exists
...
Closes #3353
3 years ago
pukkandan
e5a998f368
[cleanup] Misc cleanup ( #2173 )
...
Authored by: fstirlitz, pukkandan
3 years ago
pukkandan
f82711587c
[cleanup] Sort imports
...
Using https://github.com/PyCQA/isort
isort -m VERTICAL_HANGING_INDENT --py 36 -l 80 --rr -n --tc .
3 years ago
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
3 years ago
pukkandan
f9934b9614
[cleanup] Mark some compat variables for removal ( #2173 )
...
Authored by fstirlitz, pukkandan
3 years ago
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
3 years ago
Lesmiscore
98804d034d
[utils] locked_file: Do not give executable bits for newly created files
...
Authored by: Lesmiscore
3 years ago
pukkandan
4abea8ca0a
[utils] `sanitize_path`: Fix when path is empty string
3 years ago
pukkandan
b506289fe2
[test] Add `test_locked_file`
3 years ago
pukkandan
b63837bce0
[utils] locked_file: Fix non-blocking non-exclusive lock
3 years ago
Justin Keogh
fcfa8853e4
[utils] locked_file: Do not truncate files before locking ( #2994 )
...
Authored by: jakeogh, pukkandan
3 years ago
pukkandan
8973767198
Do not lock downloading file on Windows
...
Closes #3124
3 years ago
pukkandan
0edb3e336c
Do not prevent download if locking is unsupported
...
Closes #3022
Failure to lock download-archive is still fatal.
This is consistent with youtube-dl's behavior
3 years ago
pukkandan
a44ca5a470
[cleanup] Misc fixes
...
Closes https://github.com/yt-dlp/yt-dlp/pull/3213 , Closes https://github.com/yt-dlp/yt-dlp/pull/3117
Related: https://github.com/yt-dlp/yt-dlp/issues/3146#issuecomment-1077323114 , https://github.com/yt-dlp/yt-dlp/pull/3277#discussion_r841019671 , a825ffbffa (commitcomment-68538986)
, https://github.com/yt-dlp/yt-dlp/issues/2360 , 5fa3c9a88f (r70393519)
, 5fa3c9a88f (r70393254)
3 years ago
Lesmiscore (Naoya Ozaki)
5d45484cc7
[niconico] Fix extraction of thumbnails and uploader ( #3266 )
3 years ago
pukkandan
e6f868a63c
[utils] `traverse_obj`: Allow filtering by value
3 years ago
pukkandan
c4f60dd7cd
[utils] Add `try_call`
3 years ago
pukkandan
8a7f68d0b1
[ffmpeg] Cache version data
...
Related: https://github.com/dasl-/pifi/issues/9
3 years ago
pukkandan
90137ca4be
[utils] Add `filter_dict`
3 years ago
coletdev
1c1b2f96ae
[youtube:tab] Fix duration extraction for shorts ( #3171 )
...
Related: https://github.com/TeamNewPipe/NewPipe/issues/8034
Authored-by: coletdjnz
3 years ago
pukkandan
5c3895fff1
[outtmpl] Limit changes during sanitization
...
Closes #2761
3 years ago
pukkandan
6db9c4d57d
Ignore format-specific fields in initial pass of `--match-filter`
...
Closes #3074
3 years ago
Lesmiscore (Naoya Ozaki)
3cea3edd1a
[utils] WebSocketsWrapper: Allow omitting `__enter__` invocation ( #3187 )
...
Authored by: Lesmiscore
3 years ago
pukkandan
b1a7cd056a
Treat multiple `--match-filters` as OR
...
Closes #3144
3 years ago
pukkandan
28787f16c6
[downloader] Fix invocation of `HttpieFD`
...
Closes #3154
3 years ago
coletdev
af14914baa
Remove `Accept-Encoding` header from `std_headers` ( #3153 )
...
This should be set by each downloader to what it supports.
Fixes https://github.com/yt-dlp/yt-dlp/issues/3142
Authored-by: coletdjnz
3 years ago
coletdev
d5820461e8
Use certificates from `certifi` if installed ( #3115 )
...
Fixes #3102 and most `CERTIFICATE_VERIFY_FAILED` issues
Authored by: coletdjnz
3 years ago
s0u1h
eeb2a770f3
[utils] `format_decimal_suffix`: Fix for very large numbers ( #3109 )
...
Authored by: s0u1h
3 years ago
pukkandan
592b748582
[cleanup] Minor cleanup
...
Closes #3006
3 years ago
pukkandan
76aa991374
Fix case of `http_headers`
...
Bug in 8b7539d27c
Fixes https://github.com/yt-dlp/yt-dlp/issues/1346#issuecomment-1064527765
3 years ago
pukkandan
e491d06d34
[utils] ExtractorError: Fix for older python versions
...
Closes #2993
3 years ago
pukkandan
ff91cf7483
[utils] Add `get_first`
3 years ago
pukkandan
d1b5f70bc9
[cleanup] Refactor `__init__.py` ( #2570 )
...
* Split `__init__` code into multiple functions
* Clean up validation code by grouping similar types of options
* Expose `parse_options` to third parties
3 years ago
pukkandan
08d30158ec
[cleanup, docs] Misc cleanup
...
Closes #2828 , closes #2734 , closes #2802 , closes #2937
3 years ago
coletdev
4390d5ec12
Add brotli content-encoding support ( #2433 )
...
Authored by: coletdjnz
3 years ago
pukkandan
497d2fab6c
[utils] Better traceback for `ExtractorError`
3 years ago
Lesmiscore
1ed7953a74
[utils] render_table: Fix character calculation for removing extra gap
...
without this fix, the column next to delimiter will lack leading spaces on terminal (see https://github.com/yt-dlp/yt-dlp/pull/920#issuecomment-1059914615 for the situation)
3 years ago
Zenon Mousmoulas
27231526ae
[ant1newsgr] Add extractor ( #1982 )
...
Authored by: zmousm
3 years ago
pukkandan
8b7539d27c
Implement `--add-header` without modifying `std_headers`
...
Closes #2526 , #1614
3 years ago
pukkandan
4c3f8c3fb6
Handle negative duration from extractor
...
Closes #2921
3 years ago
pukkandan
7265a2190c
Fix doubling of `video_id` in `ExtractorError`
3 years ago
pukkandan
747c0bd127
[utils] Improve file locking
...
* Implement non-blocking locks for windows
* Don't raise error when closing a closed file
3 years ago
Justin Keogh
acea8d7cfb
[utils] Fix file locking for AOSP ( #2714 )
...
Closes #2080 , #2670
Authored by: jakeogh
3 years ago
pukkandan
f1d130902b
[utils] OnDemandPagedList: Do not download pages after error
3 years ago
Lesmiscore (Naoya Ozaki)
93c8410d33
[downloader/fragment] Fix bugs around resuming with Range ( #2901 )
...
Authored by: Lesmiscore
3 years ago
Lesmiscore (Naoya Ozaki)
15dfb3929c
[fc2:live] Add extractor ( #2418 )
...
Authored by: Lesmiscore
3 years ago
Lesmiscore (Naoya Ozaki)
3e9b66d761
[AbemaTV] Add extractors ( #1688 )
...
Authored by: Lesmiscore
3 years ago
pukkandan
09b49e1f68
Add pre-processor stage `after_filter`
...
* Move `_match_entry` and `post_extract` to `process_video_result`. It is also left in `process_info` for API compat
* `--list-...` options and `--force-write-archive` now obey filtering options
* Move `SponsorBlockPP` to `after_filter`. Closes https://github.com/yt-dlp/yt-dlp/issues/2536
* Reverts 4ec82a72bb
since this commit addresses the issue it was solving
3 years ago
Bepis
febff4c119
[tubitv] Fix/improve TV series extraction ( #2829 )
...
Authored by: bbepis
3 years ago
Lesmiscore (Naoya Ozaki)
da42679b87
[utils] WebSockets wrapper for non-async functions ( #2417 )
...
Authored by: Lesmiscore
3 years ago
pukkandan
d49f8db39f
[utils] Validate `DateRange` input
...
Closes #2641
3 years ago
Justin Keogh
a3125791c7
[utils] Use `locked_file` for `sanitize_open` ( #1066 )
...
Authored by: jakeogh
3 years ago
pukkandan
455a15e2dc
[cleanup,docs] Minor fixes
...
Closes #2541 , #2484
3 years ago
pukkandan
4918522735
[utils] Strip double spaces in `clean_html`
...
Closes #2497
Authored by: dirkf
3 years ago
pukkandan
65662dffb1
Make nested --config-locations relative to parent file
...
* and allow environment variables in it so that you can use `$PWD`/`%cd%`
to specify paths relative to current directory
3 years ago
pukkandan
d16df59db5
Fix `--compat-options list-formats`
...
Closes #2481
3 years ago
pukkandan
d37707bda4
Fix/improve `InAdvancePagedList`
3 years ago