Commit Graph

346 Commits

Author SHA1 Message Date
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
pukkandan b63837bce0
[utils] locked_file: Fix non-blocking non-exclusive lock 2022-04-07 12:02:13 +05:30
Justin Keogh fcfa8853e4
[utils] locked_file: Do not truncate files before locking (#2994)
Authored by: jakeogh, pukkandan
2022-04-06 22:58:56 -07:00
pukkandan 8973767198
Do not lock downloading file on Windows
Closes #3124
2022-04-05 23:32:22 +05:30
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
2022-04-05 23:32:22 +05:30
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)
2022-04-05 18:12:18 +05:30
Lesmiscore (Naoya Ozaki) 5d45484cc7
[niconico] Fix extraction of thumbnails and uploader (#3266) 2022-04-01 19:31:58 +09:00
pukkandan e6f868a63c
[utils] `traverse_obj`: Allow filtering by value 2022-03-31 13:33:28 +05:30
pukkandan c4f60dd7cd
[utils] Add `try_call` 2022-03-31 13:33:27 +05:30
pukkandan 8a7f68d0b1
[ffmpeg] Cache version data
Related: https://github.com/dasl-/pifi/issues/9
2022-03-29 03:44:51 +05:30
pukkandan 90137ca4be
[utils] Add `filter_dict` 2022-03-28 08:25:04 +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
pukkandan 6db9c4d57d
Ignore format-specific fields in initial pass of `--match-filter`
Closes #3074
2022-03-25 14:27:09 +05:30
Lesmiscore (Naoya Ozaki) 3cea3edd1a
[utils] WebSocketsWrapper: Allow omitting `__enter__` invocation (#3187)
Authored by: Lesmiscore
2022-03-25 17:24:39 +09:00
pukkandan b1a7cd056a
Treat multiple `--match-filters` as OR
Closes #3144
2022-03-25 13:33:46 +05:30
pukkandan 28787f16c6
[downloader] Fix invocation of `HttpieFD`
Closes #3154
2022-03-25 13:00:42 +05:30
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
2022-03-23 07:47:02 +00:00
coletdev d5820461e8
Use certificates from `certifi` if installed (#3115)
Fixes #3102 and most `CERTIFICATE_VERIFY_FAILED` issues

Authored by: coletdjnz
2022-03-22 16:26:55 -07:00
s0u1h eeb2a770f3
[utils] `format_decimal_suffix`: Fix for very large numbers (#3109)
Authored by: s0u1h
2022-03-18 14:03:09 -07:00
pukkandan 592b748582
[cleanup] Minor cleanup
Closes #3006
2022-03-11 19:40:15 +05:30
pukkandan 76aa991374
Fix case of `http_headers`
Bug in 8b7539d27c

Fixes https://github.com/yt-dlp/yt-dlp/issues/1346#issuecomment-1064527765
2022-03-11 19:29:34 +05:30
pukkandan e491d06d34
[utils] ExtractorError: Fix for older python versions
Closes #2993
2022-03-09 06:42:25 +05:30
pukkandan ff91cf7483
[utils] Add `get_first` 2022-03-09 02:26:52 +05:30
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
2022-03-08 12:03:31 -08:00
pukkandan 08d30158ec
[cleanup, docs] Misc cleanup
Closes #2828, closes #2734, closes #2802, closes #2937
2022-03-08 22:38:06 +05:30
coletdev 4390d5ec12
Add brotli content-encoding support (#2433)
Authored by: coletdjnz
2022-03-08 08:44:05 -08:00
pukkandan 497d2fab6c
[utils] Better traceback for `ExtractorError` 2022-03-08 12:04:49 +05:30
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)
2022-03-06 17:11:10 +09:00
Zenon Mousmoulas 27231526ae
[ant1newsgr] Add extractor (#1982)
Authored by: zmousm
2022-03-04 13:52:48 -08:00
pukkandan 8b7539d27c
Implement `--add-header` without modifying `std_headers`
Closes #2526, #1614
2022-03-04 20:59:03 +05:30
pukkandan 4c3f8c3fb6
Handle negative duration from extractor
Closes #2921
2022-03-04 19:49:36 +05:30
pukkandan 7265a2190c
Fix doubling of `video_id` in `ExtractorError` 2022-03-04 19:37:43 +05:30
pukkandan 747c0bd127
[utils] Improve file locking
* Implement non-blocking locks for windows
* Don't raise error when closing a closed file
2022-03-03 19:28:47 +05:30
Justin Keogh acea8d7cfb
[utils] Fix file locking for AOSP (#2714)
Closes #2080, #2670

Authored by: jakeogh
2022-03-03 05:09:00 -08:00
pukkandan f1d130902b
[utils] OnDemandPagedList: Do not download pages after error 2022-03-03 02:43:16 +05:30
Lesmiscore (Naoya Ozaki) 93c8410d33
[downloader/fragment] Fix bugs around resuming with Range (#2901)
Authored by: Lesmiscore
2022-02-28 13:10:54 +09:00
Lesmiscore (Naoya Ozaki) 15dfb3929c
[fc2:live] Add extractor (#2418)
Authored by: Lesmiscore
2022-02-25 11:16:23 +09:00
Lesmiscore (Naoya Ozaki) 3e9b66d761
[AbemaTV] Add extractors (#1688)
Authored by: Lesmiscore
2022-02-25 11:14:04 +09:00
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
2022-02-23 04:26:48 +05:30
Bepis febff4c119
[tubitv] Fix/improve TV series extraction (#2829)
Authored by: bbepis
2022-02-19 04:00:51 -08:00
Lesmiscore (Naoya Ozaki) da42679b87
[utils] WebSockets wrapper for non-async functions (#2417)
Authored by: Lesmiscore
2022-02-13 14:58:21 +09:00
pukkandan d49f8db39f
[utils] Validate `DateRange` input
Closes #2641
2022-02-12 02:46:05 +05:30
Justin Keogh a3125791c7
[utils] Use `locked_file` for `sanitize_open` (#1066)
Authored by: jakeogh
2022-02-05 16:15:51 +05:30
pukkandan 455a15e2dc
[cleanup,docs] Minor fixes
Closes #2541, #2484
2022-02-03 21:00:39 +05:30
pukkandan 4918522735
[utils] Strip double spaces in `clean_html`
Closes #2497
Authored by: dirkf
2022-02-03 21:00:37 +05:30
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
2022-02-03 21:00:36 +05:30
pukkandan d16df59db5
Fix `--compat-options list-formats`
Closes #2481
2022-02-02 06:09:10 +05:30
pukkandan d37707bda4
Fix/improve `InAdvancePagedList` 2022-01-24 01:07:14 +05:30
pukkandan e0ddbd02bd
[cleanup] Use format_field where applicable 2022-01-21 13:27:40 +05:30
xtkoba f81c62a6a4
Add option --legacy-server-connect (#778)
to allow HTTPS connection to servers that do not support RFC 5746 secure renegotiation

Authored by: xtkoba
2022-01-21 11:42:30 +05:30
pukkandan b1156c1e59
Fix d14cbdd92d 2022-01-21 07:49:03 +05:30
coletdjnz 396a76f7bf
[youtube] Enforce UTC (#2402)
and [utils] use `utcnow` in `datetime_from_str`

Related: #2223 
Authored by: coletdjnz
2022-01-20 20:32:01 +05:30
pukkandan d14cbdd92d
[utils] Add `Sec-Fetch-Mode` to `std_headers`
Closes #2187
2022-01-20 20:21:54 +05:30
pukkandan 19b4c74d40
Revert d6579d532b
Closes #2396, Reopens #2187
2022-01-20 20:00:40 +05:30
pukkandan 8bd1c00bf3
[utils] Handle `ss:xxx` in `parse_duration`
Closes #2388
2022-01-19 18:57:29 +05:30
pukkandan 3b603dbdf1
Add option `--concat-playlist`
Closes #1855, related: #382
2022-01-13 16:32:23 +05:30
pukkandan d6579d532b
[utils] Partially revert d76d15a669
Closes #2187
2022-01-10 15:02:27 +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 9e907ebddf
[cleanup] Misc cleanup 2022-01-04 01:25:10 +05:30
pukkandan 06e57990f7
Allow multiple and nested configuration files 2022-01-04 00:26:58 +05:30
pukkandan ebed8b3732
Add more post-processing stages
playlist = After entire playlist
after_video = After downloading all formats of a video
2022-01-03 19:40:05 +05:30
pukkandan 1e43a6f733
Allow `--exec` to be run at any post-processing stage
Deprecates `--exec-before-download`
2022-01-03 19:40:02 +05:30
pukkandan 1797b073ed
[utils] Use key `None` in `traverse_obj` to return as-is 2022-01-02 03:07:24 +05:30
Felix S 4afa3ec4b6
[extractor] Detect more subtitle codecs in MPD manifests (#2174)
Authored by: fstirlitz
2022-01-01 01:36:45 +05:30
pukkandan abbeeebc4c
[outtmpl] Alternate form for `D` and fix suffix's case
Fixes: https://github.com/yt-dlp/yt-dlp/issues/2085#issuecomment-1002247689, https://github.com/yt-dlp/yt-dlp/pull/2132/files#r775729811
2021-12-30 08:44:18 +05:30
pukkandan 45d86abeb4
Allow unicode characters in `info.json`
Closes #2139
2021-12-28 04:21:13 +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
Benedikt Wildenhain 4b4b7f746c
[OpenCast] Add extractors (#1905)
Original PR: https://github.com/ytdl-org/youtube-dl/pull/26934
Authored by: bwildenhain, C0D3D3V
2021-12-25 03:35:23 +05:30
Luc Ritchie 4f3fa23e5a
[utils] Fix parsing `YYYYMMDD` dates in Nov/Dec (#2094)
The date format `%Y%m%d%H%M` will successfully match against
one-digit month, day, hour, and minute strings, even though %m et al.
are documented as being zero-padded. So dates without time in
Nov/Dec may be wrongly parsed as dates in January with time.

This commit adds a format string of `%Y%m%d` to our supported date
format strings directly below (higher priority) its problematic relatives.

Closes #2076
Authored by: wlritchi
2021-12-24 02:04:01 +05:30
pukkandan b69fd25c25
[cleanup] Misc cleanup
Closes #1942 #1976 #2020 #2058 #1984
2021-12-23 07:12:46 +05:30
pukkandan e0fd95737d
[outtmpl] Add alternate forms `F`, `D`
and improve `id` detection

F = sanitize as filename (# = restricted)
D = add Decimal suffixes

Closes #2085, 2081
2021-12-23 06:49:16 +05:30
The Hatsune Daishi adbc4ec4bb
[dash,youtube] Download live from start to end (#888)
* Add option `--live-from-start` to enable downloading live videos from start
* Add key `is_from_start` in formats to identify formats (of live videos) that downloads from start
* [dash] Create protocol `http_dash_segments_generator` that allows a function to be passed instead of fragments
* [fragment] Allow multiple live dash formats to download simultaneously
* [youtube] Implement fragment re-fetching for the live dash formats
* [youtube] Re-extract dash manifest every 5 hours (manifest expires in 6hrs)
* [postprocessor/ffmpeg] Add `FFmpegFixupDuplicateMoovPP` to fixup duplicated moov atoms

Known issue: Ctrl+C doesn't work on Windows when downloading multiple formats

Closes #1521
Authored by: nao20010128nao, pukkandan
2021-12-20 11:36:46 +05:30
Felix S d76d15a669
[utils] Update `std_headers` (#2023)
* Update our chrome versions used for `User-Agent`s
* Drop the `Accept-Charset` header that no browser emits any more

Authored by: kikuyan, fstirlitz
2021-12-18 05:34:24 +05:30
The Hatsune Daishi 2814f12ba4
[skeb] Add extractor (#1916)
Fixes: https://github.com/ytdl-org/youtube-dl/issues/30287
Authored by: nao20010128nao
2021-12-09 17:10:52 +05:30
pukkandan e3c7d49571
[compat] Suppress errors in enabling VT mode
Closes #1932
2021-12-08 19:58:50 +05:30
pukkandan 38d79fd16c
Use `parse_duration` for `--wait-for-video`
and some minor fix
2021-12-06 23:30:33 +05:30
pukkandan 43b2290658
Fix `--throttled-rate` 2021-12-03 02:52:53 +05:30
pukkandan ee8dd27a73
[cleanup] Add deprecation warnings 2021-11-29 23:34:33 +05:30
pukkandan f304da8a29
[cleanup] Misc cleanup
Closes #1805, closes #1800
2021-11-29 23:34:33 +05:30
pukkandan f2ebc5c7be
Option `--wait-for-video` to wait for scheduled streams 2021-11-29 22:52:01 +05:30
pukkandan 282f570918
[utils] Fix error when copying `LazyList` 2021-11-20 08:33:55 +05:30
pukkandan c07a39ae8e
[utils] Fix `PagedList`
Bug in d8cf8d97a8
2021-11-20 08:33:53 +05:30
pukkandan c5e3f84972
[utils] Allow alignment in `render_table`
and add tests
2021-11-20 08:33:51 +05:30
pukkandan d8cf8d97a8
[utils] Fix `PagedList` 2021-11-16 21:16:05 +05:30
pukkandan c586f9e8de
[cleanup] minor fixes 2021-11-10 04:19:54 +05:30
pukkandan aa9369a2d8
[cleanup] Minor improvements to error and debug messages 2021-11-10 04:19:33 +05:30