From bc97cdae67b292a4d807e07d65cae345a2f41dbd Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sat, 3 Jul 2021 21:53:13 +0530 Subject: [PATCH] [cleanup] Fix linter and some typos Related: https://github.com/ytdl-org/youtube-dl/pull/29398 --- .github/ISSUE_TEMPLATE/1_broken_site.md | 2 +- .github/ISSUE_TEMPLATE/4_bug_report.md | 2 +- .github/ISSUE_TEMPLATE_tmpl/1_broken_site.md | 2 +- .github/ISSUE_TEMPLATE_tmpl/4_bug_report.md | 2 +- CONTRIBUTING.md | 2 +- Changelog.md | 2 +- README.md | 10 ++++++---- yt_dlp/YoutubeDL.py | 6 +----- yt_dlp/extractor/mtv.py | 1 + 9 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1_broken_site.md b/.github/ISSUE_TEMPLATE/1_broken_site.md index f60f287b0..8b458517e 100644 --- a/.github/ISSUE_TEMPLATE/1_broken_site.md +++ b/.github/ISSUE_TEMPLATE/1_broken_site.md @@ -42,7 +42,7 @@ ## Verbose log Add the `-v` flag to your command line you run yt-dlp with (`yt-dlp -v `), copy the WHOLE output and insert it below. It should look similar to this: [debug] System config: [] [debug] User config: [] - [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] + [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] yt-dlp version 2021.06.23 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 diff --git a/.github/ISSUE_TEMPLATE/4_bug_report.md b/.github/ISSUE_TEMPLATE/4_bug_report.md index 25452a0a1..bf636c7cb 100644 --- a/.github/ISSUE_TEMPLATE/4_bug_report.md +++ b/.github/ISSUE_TEMPLATE/4_bug_report.md @@ -44,7 +44,7 @@ ## Verbose log Add the `-v` flag to your command line you run yt-dlp with (`yt-dlp -v `), copy the WHOLE output and insert it below. It should look similar to this: [debug] System config: [] [debug] User config: [] - [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] + [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] yt-dlp version 2021.06.23 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 diff --git a/.github/ISSUE_TEMPLATE_tmpl/1_broken_site.md b/.github/ISSUE_TEMPLATE_tmpl/1_broken_site.md index 9d346d162..6da13a7b5 100644 --- a/.github/ISSUE_TEMPLATE_tmpl/1_broken_site.md +++ b/.github/ISSUE_TEMPLATE_tmpl/1_broken_site.md @@ -42,7 +42,7 @@ ## Verbose log Add the `-v` flag to your command line you run yt-dlp with (`yt-dlp -v `), copy the WHOLE output and insert it below. It should look similar to this: [debug] System config: [] [debug] User config: [] - [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] + [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] yt-dlp version %(version)s [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 diff --git a/.github/ISSUE_TEMPLATE_tmpl/4_bug_report.md b/.github/ISSUE_TEMPLATE_tmpl/4_bug_report.md index 043489941..af1774462 100644 --- a/.github/ISSUE_TEMPLATE_tmpl/4_bug_report.md +++ b/.github/ISSUE_TEMPLATE_tmpl/4_bug_report.md @@ -44,7 +44,7 @@ ## Verbose log Add the `-v` flag to your command line you run yt-dlp with (`yt-dlp -v `), copy the WHOLE output and insert it below. It should look similar to this: [debug] System config: [] [debug] User config: [] - [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] + [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] yt-dlp version %(version)s [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 58ab3a4b8..ef18bb4bc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,7 @@ $ youtube-dl -v [debug] System config: [] [debug] User config: [] -[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=BaW_jenozKcj'] +[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=BaW_jenozKc'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2015.12.06 [debug] Git HEAD: 135392e diff --git a/Changelog.md b/Changelog.md index 90180927a..147b421a7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -24,7 +24,7 @@ ### 2021.06.23 * Merge youtube-dl: Upto [commit/379f52a](https://github.com/ytdl-org/youtube-dl/commit/379f52a4954013767219d25099cce9e0f9401961) * **Add option `--throttled-rate`** below which video data is re-extracted * [fragment] **Merge during download for `-N`**, and refactor `hls`/`dash` -* [websockets] Add `WebSocketFragmentFD`by [nao20010128nao](https://github.com/nao20010128nao), [pukkandan](https://github.com/pukkandan) +* [websockets] Add `WebSocketFragmentFD` by [nao20010128nao](https://github.com/nao20010128nao), [pukkandan](https://github.com/pukkandan) * Allow `images` formats in addition to video/audio * [downloader/mhtml] Add new downloader for slideshows/storyboards by [fstirlitz](https://github.com/fstirlitz) * [youtube] Temporary **fix for age-gate** diff --git a/README.md b/README.md index 52f85909a..086e94366 100644 --- a/README.md +++ b/README.md @@ -1015,7 +1015,7 @@ # OUTPUT TEMPLATE Each aforementioned sequence when referenced in an output template will be replaced by the actual value corresponding to the sequence name. Note that some of the sequences are not guaranteed to be present since they depend on the metadata obtained by a particular extractor. Such sequences will be replaced with placeholder value provided with `--output-na-placeholder` (`NA` by default). -For example for `-o %(title)s-%(id)s.%(ext)s` and an mp4 video with title `yt-dlp test video` and id `BaW_jenozKcj`, this will result in a `yt-dlp test video-BaW_jenozKcj.mp4` file created in the current directory. +For example for `-o %(title)s-%(id)s.%(ext)s` and an mp4 video with title `yt-dlp test video` and id `BaW_jenozKc`, this will result in a `yt-dlp test video-BaW_jenozKc.mp4` file created in the current directory. For numeric sequences you can use numeric related formatting, for example, `%(view_count)05d` will result in a string with view count padded with zeros up to 5 characters, like in `00042`. @@ -1327,13 +1327,15 @@ # Set "comment" field in video metadata using description instead of webpage_url # EXTRACTOR ARGUMENTS -Some extractors accept additional arguments which can be passed using `--extractor-args KEY:ARGS`. `ARGS` is a `;` (colon) seperated string of `ARG=VAL1,VAL2`. Eg: `--extractor-args youtube:skip=dash,hls` +Some extractors accept additional arguments which can be passed using `--extractor-args KEY:ARGS`. `ARGS` is a `;` (semicolon) seperated string of `ARG=VAL1,VAL2`. Eg: `--extractor-args youtube:skip=dash,hls` The following extractors use this feature: * **youtube** * `skip`: `hls` or `dash` (or both) to skip download of the respective manifests - * `player_client`: `web`(default) or `android` (force use the android client fallbacks for video extraction) - * `player_skip`: `configs`- skip requests if applicable for client configs and use defaults + * `player_client`: `web` (default) or `android` (force use the android client fallbacks for video extraction) + * `player_skip`: `configs` - skip requests if applicable for client configs and use defaults + +NOTE: These options may be changed/removed in the future without concern for backward compatibility # PLUGINS diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 87b339b99..d1f6d2ed1 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -3049,11 +3049,7 @@ def list_formats(self, info_dict): self.to_screen( '[info] Available formats for %s:' % info_dict['id']) self.to_stdout(render_table( - header_line, - table, - delim=new_format, - extraGap=(0 if new_format else 1), - hideEmpty=new_format)) + header_line, table, delim=new_format, extraGap=(0 if new_format else 1), hideEmpty=new_format)) def list_thumbnails(self, info_dict): thumbnails = list(info_dict.get('thumbnails')) diff --git a/yt_dlp/extractor/mtv.py b/yt_dlp/extractor/mtv.py index 510f1439e..303f71cf8 100644 --- a/yt_dlp/extractor/mtv.py +++ b/yt_dlp/extractor/mtv.py @@ -249,6 +249,7 @@ def _get_videos_info_from_url(self, url, video_id, use_hls=True): if info: entries.append(info) + # TODO: should be multi-video return self.playlist_result( entries, playlist_title=title, playlist_description=description)