Commit Graph

334 Commits

Author SHA1 Message Date
pukkandan
3ce2933693
[youtube] Fix error reporting of "Incomplete data"
Related: #4669
2022-08-16 22:01:48 +05:30
pukkandan
8f84770acd
[utils] Fix get_compatible_ext
Closes #4647
2022-08-14 19:22:34 +05:30
Lesmiscore
62b58c0936
[docs] Consistent use of e.g. (#4643)
Authored by: Lesmiscore
2022-08-14 17:34:13 +05:30
pukkandan
8f53dc44a0
[jsinterp] Handle new youtube signature functions
Closes #4635
2022-08-14 05:12:32 +05:30
pukkandan
a1c5bd82ec
[jsinterp] Truncate error messages
Related: #4635
2022-08-12 19:15:16 +05:30
pukkandan
989a01c261
[outtmpl] Smarter replacing of unsupported characters
Closes #1330
2022-08-04 20:21:32 +05:30
pukkandan
05e2243e80
Fix bug in be5c1ae862 2022-08-04 20:18:29 +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
pukkandan
fe0918bb65
Import ctypes only when necessary
Closes #4541
2022-08-03 17:48:59 +05:30
pukkandan
0647d9251f
Minor bugfixes 2022-08-02 03:52:23 +05:30
pukkandan
be5c1ae862
Standardize retry mechanism (#1649)
* [utils] Create `RetryManager`
* Migrate all retries to use the manager
* [extractor] Add wrapper methods for convenience
* Standardize console messages for retries
* Add `--retry-sleep` for extractors
2022-08-02 01:43:18 +05:30
pukkandan
8f97a15d1c [extractor] Framework for embed detection (#4307) 2022-08-02 01:08:16 +05:30
nixxo
47304e07dc
[extractor/rai] Add raisudtirol extractor (#4524)
Closes #4206
Authored by: nixxo
2022-08-02 00:55:48 +05:30
pukkandan
daef791100
[utils] sanitize_open: Allow any IO stream as stdout
Fixes: https://github.com/yt-dlp/yt-dlp/issues/3298#issuecomment-1181754989
2022-07-31 03:31:20 +05:30
pukkandan
8dc5930511
[utils, cleanup] Consolidate known media extensions 2022-07-31 02:20:13 +05:30
coletdjnz
871a8929bc
[extractor/archiveorg] Improve handling of formats (#4461)
* Ignore private formats if not logged in (fixes https://github.com/yt-dlp/yt-dlp/issues/3832)
* Prefer original formats
* Support mpg formats

Authored by: coletdjnz, pukkandan
2022-07-29 05:09:36 +00:00
pukkandan
693f060040
[youtube,twitch] Allow waiting for channels to become live
Closes #2597
2022-07-26 09:33:19 +05:30
pukkandan
3bec830a59
Reject entire playlists faster with --match-filter
Rejected based on `playlist_id` etc can be checked before any entries are extracted

Related: #4383
2022-07-26 09:33:12 +05:30
pukkandan
6929b41a21
Remove Python 3.6 support
Closes #3764
2022-07-18 06:31:14 +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
ebf99aaf70
[utils] Fix get_domain
Bug in ae61d108dd

Closes #4344
2022-07-13 19:44:19 +05:30
pukkandan
d816f61fbf
[utils, cleanup] Refactor parse_codecs 2022-07-11 01:10:38 +05:30
pukkandan
f2df407165
[cleanup] Misc cleanup 2022-07-09 09:07:10 +05:30
pukkandan
168bbc4f38
Do not load system certificates when certifi is used
This causes `CERTIFICATE_VERIFY_FAILED` if there is an
expired/bad certificate in the system store

Partially reverts 8a82af3511

Related: #4145
2022-07-07 11:29:49 +05:30
pukkandan
284a60c516
[options] Fix aliases to --config-location 2022-07-01 09:32:30 +05:30
Lesmiscore
44f14eb43e
Fix bug in 612f2be5d3 2022-06-30 21:59:39 +09:00
pukkandan
ae61d108dd
[cleanup] Misc cleanup 2022-06-29 06:43:27 +05:30
pukkandan
b1f94422cc
[update] Ability to set a maximum version for specific variants 2022-06-29 06:43:24 +05:30
crazymoose77756
962ffcf89c
[cleanup] Fix some typos (#4194)
Authored by: crazymoose77756
2022-06-26 17:50:06 -07:00
pukkandan
c043c24625
[extractor] Fix _create_request when headers is None
Closes #4164
2022-06-25 19:41:22 +05:30
pukkandan
14f25df2b6
[compat] Remove deprecated functions from core code 2022-06-25 00:14:12 +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
coletdev
379a4f161d
[utils] Fix inconsistent default handling between HTTP and HTTPS requests (#4158)
Default headers such as `Content-Type` were only being added for HTTPS requests among other handling.

Fixes bug in be4a824d74

Authored-by: coletdjnz
2022-06-24 03:29:28 +00:00
pukkandan
1ac4fd80c8
Fix playlist error handling
Bug in 7e88d7d78f
2022-06-22 08:39:14 +05:30
pukkandan
57e0f077a6
[update] Expose more functionality to API 2022-06-21 17:02:56 +05:30
pukkandan
5df1444255
[utils] ExtractorError: Fix exc_info 2022-06-20 12:35:02 +05:30
pukkandan
612f2be5d3
Bugfix for 7b2c3f47c6 2022-06-20 12:03:35 +05:30
pukkandan
7b2c3f47c6
[cleanup] Misc 2022-06-20 11:44:55 +05:30
pukkandan
8aa0e7cd96
[docs] Improvements 2022-06-20 10:48:29 +05:30
pukkandan
8072ef2bbd
[extractor/BiliIntl] Fix metadata extraction
Closes #4116
2022-06-20 03:05:46 +05:30
pukkandan
44a6fcff39
Improve error handling of bad config files
Related: #824
2022-06-18 09:19:39 +05:30
pukkandan
a70635b8a1
[cleanup, utils] Don't use kwargs for format_field 2022-06-18 08:13:22 +05:30
christoph-heinrich
e121e3cee7
[cleanup] Minor fixes (#4096)
Authored by: christoph-heinrich
2022-06-17 18:57:22 -07:00
pukkandan
7e9a612585
Add option --lazy-playlist to process entries as they are received 2022-06-17 14:20:40 +05:30
pukkandan
7e88d7d78f
Add slicing notation to --playlist-items
* Adds support for negative indices and step
* Add `-I` as alias for `--playlist-index`
* Deprecates `--playlist-start`, `--playlist-end`, `--playlist-reverse`, `--no-playlist-reverse`

Closes #2951, Closes #2853
2022-06-17 10:36:52 +05:30
pukkandan
f0c9fb9682
[utils] Popen: Refactor to use contextmanager
Fixes https://github.com/yt-dlp/yt-dlp/issues/3531#issuecomment-1156223597
2022-06-16 06:23:50 +05:30
pukkandan
2cb1982043
[utils] locked_file: Fix for PyPy on Windows 2022-06-13 19:21:31 +05:30
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
2022-06-12 00:08:16 +05:30
pukkandan
56ba69e4c9
[cleanup] Misc fixes
Closes #4027
2022-06-11 05:00:12 +05:30
pukkandan
5ec1b6b716
Add option --download-sections to download video partially
Closes #52, Closes #3932
2022-06-07 02:41:55 +05:30
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
2022-06-06 19:46:45 +05:30
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
2022-06-03 21:45:35 +05:30
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
2022-05-28 03:46:36 +00:00
pukkandan
8a82af3511
[cleanup] Misc fixes and cleanup
Closes #3780, Closes #3853, Closes #3850
2022-05-27 04:43:43 +05:30
pukkandan
6b9e832db7
--config-location - to provide options interactively 2022-05-27 04:32:54 +05:30
pukkandan
b5899f4f19
[build, cleanup] Refactor
Closes #3835, #3837
2022-05-22 17:07:18 +05:30
pukkandan
c487cf0010
[cleanup] Misc 2022-05-21 16:01:53 +05:30
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
2022-05-20 06:01:09 +05:30
pukkandan
0b9c08b47b
[utils] Improve performance using functools.cache
Closes #3786
2022-05-19 20:23:53 +05:30
pukkandan
2f97cc615b
[utils] ISO3166Utils: Add EU and AP
Fixes https://github.com/yt-dlp/yt-dlp/pull/3302#discussion_r875528517
2022-05-19 20:05:26 +05:30
pukkandan
9e49146352
Add option --alias 2022-05-19 19:45:21 +05:30
pukkandan
21633673c3
[cleanup] Minor fixes 2022-05-18 09:04:30 +05:30
pukkandan
80e8493ee7
[utils] is_html: Handle double BOM
Closes #2885
2022-05-18 07:03:50 +05:30
pukkandan
7896214c42
Bugfix for 591bb9d355
Closes #3769
2022-05-17 22:33:15 +05:30
pukkandan
591bb9d355
Fix color in -q -F
and convert `ydl._out_files`/`ydl._allow_colors` to `Namespace`

Closes #3761
2022-05-17 18:41:46 +05:30
pukkandan
2414649192
[cleanup] Misc cleanup 2022-05-17 00:07:43 +05:30
pukkandan
82d020804d
[extractor] Use classmethod/property where possible
and refactor lazy extractors accordingly.

This reduces the need to create extractor instances
2022-05-13 00:23:26 +05:30
pukkandan
3d38b2d6d0
Fix --date today
Closes #3704
2022-05-11 07:25:56 +05:30
pukkandan
d76fa1f3d4
[cookies] Allow cookiefile to be a text stream
Closes #3674
2022-05-11 05:52:55 +05:30
pukkandan
fe1daad3cb
Bugfix for 59f943cd50
Fixes: 59f943cd50 (commitcomment-73251597)
2022-05-10 11:08:58 +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
4f28b537d9
Allow use of weaker ciphers with --legacy-server-connect
Closes #2043
2022-05-07 18:40:44 +05:30
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>
2022-05-02 07:59:45 +00:00
coletdev
afac4caa7d
Fix redirect HTTP method handling (#3577)
Authored by: coletdjnz
2022-05-01 20:40:26 -07:00
Justin Keogh
131e14dc66
[utils] locked_file: Ignore illegal seek on truncate (#3610)
Closes #3557

Authored by: jakeogh
2022-05-01 13:31:06 -07:00
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
2022-05-01 04:58:38 +05:30
pukkandan
6f7563beb7
[XAttrMetadata] Refactor and document dependencies 2022-05-01 04:58:38 +05:30
Lesmiscore
94aa064497
[utils] YoutubeDLCookieJar: Detect and reject JSON file (#3599)
Authored by: Lesmiscore
2022-05-01 00:38:30 +09:00
pukkandan
1d485a1a79
[cleanup] Misc fixes
Closes #3565, https://github.com/yt-dlp/yt-dlp/issues/3514#issuecomment-1105944364
2022-04-29 07:39:33 +05:30
pukkandan
492272fed6
--match-filter - to interactively ask for each video 2022-04-28 20:04:40 +05:30
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
2022-04-28 20:04:40 +05:30
pukkandan
059bc4db19
[compat/asyncio] Use asyncio.all_tasks 2022-04-26 05:45:18 +05:30
pukkandan
9cd080508d
Revert acbc642250
Reverts "[utils] WebSocketsWrapper: Ignore warnings at websockets instantiation"

The warning should not be suppressed. We need to address it
2022-04-26 05:43:19 +05:30
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)
2022-04-25 00:44:30 +09:00
pukkandan
9b8ee23b99
[dependencies] Create module with all dependency imports 2022-04-21 00:48:52 +05:30
pukkandan
62f6f1cbf2
Don't imply -s for later stages of -O 2022-04-20 21:01:34 +05:30
pukkandan
1e9969f4f5
bugfix for a44ca5a470, 19a0394044, 77f9033095
Closes #3472
2022-04-19 02:59:20 +05:30
pukkandan
19a0394044
[cleanup] Misc cleanup and refactor (#2173) 2022-04-18 02:28:28 +05:30
pukkandan
abfecb7bc1
[utils] Fix WebSocketsWrapper
Bug in 3cea3edd1a
Closes #3422
2022-04-15 23:47:37 +05:30
pukkandan
b07897ef5b
[utils] certifi: Make sure the pem file exists
Closes #3353
2022-04-12 05:32:53 +05:30
pukkandan
e5a998f368
[cleanup] Misc cleanup (#2173)
Authored by: fstirlitz, pukkandan
2022-04-12 05:32:52 +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
pukkandan
f9934b9614
[cleanup] Mark some compat variables for removal (#2173)
Authored by fstirlitz, pukkandan
2022-04-12 05:32:50 +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
Lesmiscore
98804d034d
[utils] locked_file: Do not give executable bits for newly created files
Authored by: Lesmiscore
2022-04-10 01:23:27 +09:00
pukkandan
4abea8ca0a
[utils] sanitize_path: Fix when path is empty string 2022-04-09 10:11:25 +05:30
pukkandan
b506289fe2
[test] Add test_locked_file 2022-04-07 12:05:44 +05:30