A feature-rich command-line audio/video downloader
[cleanup] Misc
pukkandan1e4fca9a87b0
diff --git a/Changelog.md b/Changelog.mdindex 483c947b60..ad9c00b204 100644--- a/Changelog.md+++ b/Changelog.md@@ -20,10 +20,10 @@* `--compat-option no-live-chat` should disable danmaku* Fix misleading DRM message* Import ctypes only when necessary-* Minor bugfixes by [pukkandan](https://github.com/pukkandan)-* Reject entire playlists faster with `--match-filter` by [pukkandan](https://github.com/pukkandan)+* Minor bugfixes+* Reject entire playlists faster with `--match-filter`* Remove filtered entries from `-J`-* Standardize retry mechanism by [pukkandan](https://github.com/pukkandan)+* Standardize retry mechanism* Validate `--merge-output-format`* [downloader] Add average speed to final progress line* [extractor] Add field `audio_channels`@@ -31,7 +31,7 @@* [ffmpeg] Set `ffmpeg_location` in a contextvar* [FFmpegThumbnailsConvertor] Fix conversion from GIF* [MetadataParser] Don't set `None` when the field didn't match-* [outtmpl] Smarter replacing of unsupported characters by [pukkandan](https://github.com/pukkandan)+* [outtmpl] Smarter replacing of unsupported characters* [outtmpl] Treat empty values as None in filenames* [utils] sanitize_open: Allow any IO stream as stdout* [build, devscripts] Add devscript to set a build variant@@ -64,7 +64,7 @@* [extractor/bbc] Fix news articles by [ajj8](https://github.com/ajj8)* [extractor/camtasia] Separate into own extractor by [coletdjnz](https://github.com/coletdjnz)* [extractor/cloudflarestream] Fix video_id padding by [haobinliang](https://github.com/haobinliang)-* [extractor/crunchyroll] Fix conversion of thumbnail from GIF by [pukkandan](https://github.com/pukkandan)+* [extractor/crunchyroll] Fix conversion of thumbnail from GIF* [extractor/crunchyroll] Handle missing metadata correctly by [Burve](https://github.com/Burve), [pukkandan](https://github.com/pukkandan)* [extractor/crunchyroll:beta] Extract timestamp and fix tests by [tejing1](https://github.com/tejing1)* [extractor/crunchyroll:beta] Use streams API by [tejing1](https://github.com/tejing1)diff --git a/Collaborators.md b/Collaborators.mdindex 52e3b9caea..3f24d5c476 100644--- a/Collaborators.md+++ b/Collaborators.md@@ -28,12 +28,12 @@ You can also find lists of all [contributors of yt-dlp](CONTRIBUTORS) and [autho[](https://github.com/sponsors/coletdjnz)* YouTube improvements including: age-gate bypass, private playlists, multiple-clients (to avoid throttling) and a lot of under-the-hood improvements-* Added support for downloading YoutubeWebArchive videos-* Added support for new websites MainStreaming, PRX, nzherald, etc+* Added support for new websites YoutubeWebArchive, MainStreaming, PRX, nzherald, Mediaklikk, StarTV etc+* Improved/fixed support for Patreon, panopto, gfycat, itv, pbs, SouthParkDE etc-## [Ashish0804](https://github.com/Ashish0804)+## [Ashish0804](https://github.com/Ashish0804) <sub><sup>[Inactive]</sup></sub>[](https://ko-fi.com/ashish0804)@@ -48,4 +48,5 @@ You can also find lists of all [contributors of yt-dlp](CONTRIBUTORS) and [autho**Monacoin**: mona1q3tf7dzvshrhfe3md379xtvt2n22duhglv5dskr* Download live from start to end for YouTube-* Added support for new websites mildom, PixivSketch, skeb, radiko, voicy, mirrativ, openrec, whowatch, damtomo, 17.live, mixch etc+* Added support for new websites AbemaTV, mildom, PixivSketch, skeb, radiko, voicy, mirrativ, openrec, whowatch, damtomo, 17.live, mixch etc+* Improved/fixed support for fc2, YahooJapanNews, tver, iwara etcdiff --git a/README.md b/README.mdindex 42cbfcebac..31793b54e0 100644--- a/README.md+++ b/README.md@@ -146,7 +146,7 @@ Some of yt-dlp's default options are different from that of youtube-dl and youtu* Some private fields such as filenames are removed by default from the infojson. Use `--no-clean-infojson` or `--compat-options no-clean-infojson` to revert this* When `--embed-subs` and `--write-subs` are used together, the subtitles are written to disk and also embedded in the media file. You can use just `--embed-subs` to embed the subs and automatically delete the separate file. See [#630 (comment)](https://github.com/yt-dlp/yt-dlp/issues/630#issuecomment-893659460) for more info. `--compat-options no-keep-subs` can be used to revert this* `certifi` will be used for SSL root certificates, if installed. If you want to use system certificates (e.g. self-signed), use `--compat-options no-certifi`-* youtube-dl tries to remove some superfluous punctuations from filenames. While this can sometimes be helpful, it is often undesirable. So yt-dlp tries to keep the fields in the filenames as close to their original values as possible. You can use `--compat-options filename-sanitization` to revert to youtube-dl's behavior+* yt-dlp's sanitization of invalid characters in filenames is different/smarter than in youtube-dl. You can use `--compat-options filename-sanitization` to revert to youtube-dl's behaviorFor ease of use, a few more compat options are available:@@ -1758,9 +1758,7 @@ The following extractors use this feature:* `comment_sort`: `top` or `new` (default) - choose comment sorting mode (on YouTube's side)* `max_comments`: Limit the amount of comments to gather. Comma-separated list of integers representing `max-comments,max-parents,max-replies,max-replies-per-thread`. Default is `all,all,all,all`* E.g. `all,all,1000,10` will get a maximum of 1000 replies total, with up to 10 replies per thread. `1000,all,100` will get a maximum of 1000 comments, with a maximum of 100 replies total-* `innertube_host`: Innertube API host to use for all API requests- * E.g. `studio.youtube.com`, `youtubei.googleapis.com`- * Note: Cookies exported from `www.youtube.com` will not work with hosts other than `*.youtube.com`+* `innertube_host`: Innertube API host to use for all API requests; e.g. `studio.youtube.com`, `youtubei.googleapis.com`. Note that cookies exported from one subdomain will not work on others* `innertube_key`: Innertube API key to use for all API requests#### youtubetab (YouTube playlists, channels, feeds, etc.)diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.pyindex 498e8dd8e2..7a2b03cb50 100644--- a/yt_dlp/YoutubeDL.py+++ b/yt_dlp/YoutubeDL.py@@ -301,7 +301,7 @@ class YoutubeDL:should act on each input URL as opposed to for the entire queuecookiefile: File name or text stream from where cookies should be read and dumped tocookiesfrombrowser: A tuple containing the name of the browser, the profile- name/pathfrom where cookies are loaded, and the name of the+ name/path from where cookies are loaded, and the name of thekeyring, e.g. ('chrome', ) or ('vivaldi', 'default', 'BASICTEXT')legacyserverconnect: Explicitly allow HTTPS connection to servers that do notsupport RFC 5746 secure renegotiationdiff --git a/yt_dlp/extractor/jixie.py b/yt_dlp/extractor/jixie.pyindex 3bb685e016..7480af0504 100644--- a/yt_dlp/extractor/jixie.py+++ b/yt_dlp/extractor/jixie.py@@ -1,17 +1,14 @@from .common import InfoExtractor-from ..utils import (- clean_html,- float_or_none,- traverse_obj,- try_call,-)--# more info about jixie:-# [1] https://jixie.atlassian.net/servicedesk/customer/portal/2/article/1339654214?src=-1456335525,-# [2] https://scripts.jixie.media/jxvideo.3.1.min.js+from ..utils import clean_html, float_or_none, traverse_obj, try_callclass JixieBaseIE(InfoExtractor):+ """+ API Reference:+ https://jixie.atlassian.net/servicedesk/customer/portal/2/article/1339654214?src=-1456335525,+ https://scripts.jixie.media/jxvideo.3.1.min.js+ """+def _extract_data_from_jixie_id(self, display_id, video_id, webpage):json_data = self._download_json('https://apidam.jixie.io/api/public/stream', display_id,diff --git a/yt_dlp/extractor/kompas.py b/yt_dlp/extractor/kompas.pyindex 03f5f30bd7..8bad961906 100644--- a/yt_dlp/extractor/kompas.py+++ b/yt_dlp/extractor/kompas.py@@ -1,7 +1,5 @@from .jixie import JixieBaseIE-# Video from video.kompas.com seems use jixie player-class KompasVideoIE(JixieBaseIE):_VALID_URL = r'https?://video\.kompas\.com/\w+/(?P<id>\d+)/(?P<slug>[\w-]+)'diff --git a/yt_dlp/extractor/mlb.py b/yt_dlp/extractor/mlb.pyindex 48baecc47a..ab0edbae39 100644--- a/yt_dlp/extractor/mlb.py+++ b/yt_dlp/extractor/mlb.py@@ -325,7 +325,7 @@ class MLBTVIE(InfoExtractor):airings = self._download_json(f'https://search-api-mlbtv.mlb.com/svc/search/v2/graphql/persisted/query/core/Airings?variables=%7B%22partnerProgramIds%22%3A%5B%22{video_id}%22%5D%2C%22applyEsniMediaRightsLabels%22%3Atrue%7D',video_id)['data']['Airings']-+formats, subtitles = [], {}for airing in airings:m3u8_url = self._download_json(diff --git a/yt_dlp/extractor/parler.py b/yt_dlp/extractor/parler.pyindex 5d60134e0c..68a60bc84f 100644--- a/yt_dlp/extractor/parler.py+++ b/yt_dlp/extractor/parler.py@@ -1,8 +1,5 @@-import json-from .common import InfoExtractorfrom .youtube import YoutubeIE-from ..utils import (clean_html,format_field,diff --git a/yt_dlp/extractor/twitch.py b/yt_dlp/extractor/twitch.pyindex a667d6ec2d..975e09c302 100644--- a/yt_dlp/extractor/twitch.py+++ b/yt_dlp/extractor/twitch.py@@ -1169,7 +1169,7 @@ class TwitchClipsIE(TwitchBaseIE):'id': clip.get('id') or video_id,'_old_archive_ids': [make_archive_id(self, old_id)] if old_id else None,'display_id': video_id,- 'title': clip.get('title') or video_id,+ 'title': clip.get('title'),'formats': formats,'duration': int_or_none(clip.get('durationSeconds')),'view_count': int_or_none(clip.get('viewCount')),diff --git a/yt_dlp/extractor/zattoo.py b/yt_dlp/extractor/zattoo.pyindex 9ce15b3889..2bd684c7e8 100644--- a/yt_dlp/extractor/zattoo.py+++ b/yt_dlp/extractor/zattoo.py@@ -2,10 +2,7 @@ import refrom uuid import uuid4from .common import InfoExtractor-from ..compat import (- compat_HTTPError,- compat_str,-)+from ..compat import compat_HTTPError, compat_strfrom ..utils import (ExtractorError,int_or_none,