Commit Graph

257 Commits (ae61d108dd83a951b6e8a27e1fb969682416150d)

Author SHA1 Message Date
pukkandan 6251555f1c
[downloader/ffmpeg] Support for DASH manifests (experimental)
Closes #159
3 years ago
pukkandan 330690a214
[downloader/ffmpeg] Allow passing custom arguments before -i
Closes #686
3 years ago
pukkandan 1151c4079a
[extractor] Show video id in error messages if possible 3 years ago
pukkandan 4dfbf8696b
[utils] Add `parse_qs` 3 years ago
pukkandan 8f18aca871
Let `--match-filter` reject entries early
Makes redundant: `--match-title`, `--reject-title`, `--min-views`, `--max-views`
3 years ago
pukkandan 7be9ccff0b [utils] Fix `InAdvancePagedList.__getitem__`
Since it didn't have any cache, the page was re-fetched for each video.
* Also generalized the cache code
3 years ago
pukkandan b868936cd6 [cleanup] Misc 3 years ago
pukkandan 6e84b21559
Fix bugs related to `sanitize_info`
Related: 8012d892bd (r54555230)
3 years ago
pukkandan 575e17a1b9
[utils] Fix `traverse_obj` depth when is_user_input 3 years ago
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
3 years ago
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
3 years ago
pukkandan dbf5416a20 [cleanup] Refactor some code 3 years ago
pukkandan e0f2b4b47d
[utils] Fix slicing of reversed `LazyList`
Closes #589
3 years ago
pukkandan 7d1eb38af1
Add format types `j`, `l`, `q` for outtmpl
Closes #345
3 years ago
pukkandan 901130bbcf Expand and escape environment variables correctly in outtmpl
Fixes: https://www.reddit.com/r/youtubedl/comments/otfmq3/ytdlp_same_parameters_different_results
3 years ago
xtkoba cb89cfc14b
[test] Add Python 3.10 (#480)
Authored-by: pukkandan, xtkoba
3 years ago
pukkandan 352d63fdb5
[utils] Improve `traverse_obj` 3 years ago
pukkandan 6586bca9b9
[utils] Fix LazyList for Falsey values 3 years ago
pukkandan c634ad2a3c [compat] Remove unnecessary code 3 years ago
pukkandan 8f3343809e
[utils] Improve `traverse_obj`
* Allow skipping a level: `traverse_obj([{k:v1}, {k:v2}], (None, k))` => `[v1, v2]`
* Make keys variadic: `traverse_obj(obj, k1: str, k2: str)` => `traverse_obj(obj, (k1,), (k2,))`
* Fetch from multiple keys: `traverse_obj([{k1:[1], k2:[2], k3:[3]}], (0, (k1, k2), 0))` => `[1, 2]`

TODO: Add tests
3 years ago
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
3 years ago
pukkandan 325ebc1703
Improve `traverse_obj` 3 years ago
pukkandan 6606817a86
[utils] Add `variadic` 3 years ago
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`
3 years ago
pukkandan 51d9739f80
Add option `--throttled-rate` below which video data is re-extracted
Currently only for HTTP downloads

Closes #430, workaround for https://github.com/ytdl-org/youtube-dl/issues/29326
3 years ago
pukkandan 9fea350f0d
Fix id sanitization in filenames
Closes #415
3 years ago
felix cdb19aa4c2
[downloader/mhtml] Add new downloader (#343)
This downloader is intended to be used for streams that consist of a
timed sequence of stand-alone images, such as slideshows or thumbnail
streams

This can be used for implementing:

https://github.com/ytdl-org/youtube-dl/issues/4974#issue-58006762
https://github.com/ytdl-org/youtube-dl/issues/4540#issuecomment-69574231
https://github.com/ytdl-org/youtube-dl/pull/11185#issuecomment-335554239

https://github.com/ytdl-org/youtube-dl/issues/9868
https://github.com/ytdl-org/youtube-dl/pull/14951


Authored by: fstirlitz
3 years ago
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
3 years ago
pukkandan 639f1cea92
Fix `%d` and empty default in outtmpl
Closes #388
3 years ago
pukkandan 324ad82006
[utils] Generalize `traverse_dict` to `traverse_obj` 3 years ago
pukkandan 752cda3880
Fix and refactor `prepare_outtmpl`
The following tests would have failed previously:
%(id)d %(id)r
%(ext)s-%(ext|def)d
%(width|)d
%(id)r %(height)r
%(formats.0)r
%s
3 years ago
felix cc52de4356
[cleanup] Point all shebang to `python3` (#372)
Authored by: fstirlitz
3 years ago
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.
3 years ago
pukkandan 55575225b4
[utils] Add `__getitem__` for `PagedList` 3 years ago
pukkandan 483336e79e
[utils] Add `LazyList` 3 years ago
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
3 years ago
pukkandan 81a23040eb
[cleanup] Refactor ffmpeg convertors 3 years ago
king-millez 5014558ab9
[parlview] Add extractor (#322)
Authored by: king-millez
3 years ago
pukkandan 5112f26a60
Add `pl_thumbnail` outtmpl key for playlist thumbnails
This should have been implemented in 681de68e9d, but I forgot
3 years ago
pukkandan 2f567473c6
[Plugins] Prioritize plugins over standard extractors
and prevent plugins from overwriting the standard extractor classes

Closes #304
3 years ago
pukkandan e625be0d10
Improve output template internal formatting
* Allow slicing lists/strings using `field.start🔚step`
* A field can also be used as offset like `field1+num+field2`
* A default value can be given using `field|default`
* Capture all format strings and set it to `None` if invalid. This prevents invalid fields from causing errors
3 years ago
pukkandan 3158150cb7
[utils] Add `network_exceptions` 3 years ago
pukkandan d2558234cf
[utils] Escape URL while sanitizing
Closes #263

While this fixes the issue in question, it does not try to address the root-cause of the problem
Refer: 915f911e36, f5fa042c82
3 years ago
pukkandan f5fa042c82
Revert "[utils] Encode URLs in `YoutubeDLCookieProcessor`"
This reverts commit 915f911e36.

When the request is copied, `unredirected_hdrs` are not copied, which causes issues elsewhere
Reopens #263
3 years ago
Felix S 5873d4ccdd [utils] Improve bug_report_message
Add an optional argument specifying the text that should go before
the message.
3 years ago
pukkandan 915f911e36
[utils] Encode URLs in `YoutubeDLCookieProcessor`
Closes #263
3 years ago
pukkandan a439a3a45c
Improve output template (see desc)
* Objects can be traversed like `%(field.key1.key2)s`
* A number can be added to the field as `%(field+n)s`
* Deprecates `--autonumber-start`
3 years ago
pukkandan 201c145953
Update to ytdl-commit-9f6c03
[cbsnews] Fix extraction for python <3.6
9f6c03a006
3 years ago
colethedj 9e62f283ff
[utils] Add `datetime_from_str` to parse relative time (#221)
and `datetime_add_months` to accurately add/subtract months

Authored by: colethedj
3 years ago
pukkandan 143db31d48
Parse metadata from multiple fields
Closes #196
3 years ago
pukkandan 498f560638
Ability to load playlist infojson
* If `--no-clean-infojson` is given, the video ids are saved/loaded from in the infojson along with their playlist index
* If a video entry that was not saved is requested, we fallback to using `webpage_url` to re-extract the entries

Related: https://github.com/yt-dlp/yt-dlp/issues/190#issuecomment-804921024
3 years ago
2ShedsJackson 5c5fae6d2f
[amcnetworks] Fix extractor (#179)
* Prefer use of manifest based on `releasePid` since the one based on `videoPid` may have Fairplay
* Additional thumbnail images were added
* Don't add `season_number` and `series` to `title`
* `series` is now set to `None` rather than "_" when empty
* fix bug with age limit

Authored by: 2ShedsJackson
3 years ago
pukkandan 75d43ca080
Option to keep private keys in the infojson
Options: --clean-infojson, --no-clean-infojson

Related: https://github.com/yt-dlp/yt-dlp/issues/42#issuecomment-800778391
3 years ago
pukkandan 7275535116
Split video by chapters (#158)
* New options `--split-chapters` and `--no-split-chapters`
* The output/path of the split files can be given using the key `chapter`
* Additional keys `section_title`, `section_number`, `section_start`, `section_end` are available in the output template
* Alias `--split-tracks` for parity with animelover/youtube-dl
* `--sponskrub-cut` and `--split-chapter` cannot work together

Closes:
https://github.com/blackjack4494/yt-dlc/issues/277
https://github.com/ytdl-org/youtube-dl/issues/28438
https://github.com/ytdl-org/youtube-dl/issues/12907
https://github.com/ytdl-org/youtube-dl/issues/6480
https://github.com/ytdl-org/youtube-dl/pull/25005

Rewritten from the implementation by: femaref and Wattux
https://github.com/Wattux/youtube-dl/tree/split-at-timestamps
https://github.com/ytdl-org/youtube-dl/pull/25005
https://github.com/femaref/youtube-dl/tree/split-track
3 years ago
pukkandan e92caff5d5
Refactor (See desc)
* Create `FFmpegPostProcessor.real_run_ffmpeg` that can accept multiple input/output files along with switches for each
* Rewrite `cli_configuration_args` and related functions
* Create `YoutubeDL._ensure_dir_exists` - this was previously defined in multiple places
3 years ago
shirt-dev c552ae8838
Fix `get_executable_path` (#117)
Authored-by: shirtjs <2660574+shirtjs@users.noreply.github.com>
3 years ago
Pccode66 7a5c1cfe93
Completely change project name to yt-dlp (#85)
* All modules and binary names are changed
* All documentation references changed
* yt-dlp no longer loads youtube-dlc config files
* All URLs changed to point to organization account

Co-authored-by: Pccode66
Co-authored-by: pukkandan
3 years ago