A feature-rich command-line audio/video downloader
[cleanup] Misc (#13278)
bashonly339614a173c7
diff --git a/README.md b/README.mdindex 75de66a976..0f9a7d5564 100644--- a/README.md+++ b/README.md@@ -1795,7 +1795,7 @@ Note: In CLI, `ARG` can use `-` instead of `_`; e.g. `youtube:player-client"` beThe following extractors use this feature:#### youtube-* `lang`: Prefer translated metadata (`title`, `description` etc) of this language code (case-sensitive). By default, the video primary language metadata is preferred, with a fallback to `en` translated. See [youtube.py](https://github.com/yt-dlp/yt-dlp/blob/c26f9b991a0681fd3ea548d535919cec1fbbd430/yt_dlp/extractor/youtube.py#L381-L390) for list of supported content language codes+* `lang`: Prefer translated metadata (`title`, `description` etc) of this language code (case-sensitive). By default, the video primary language metadata is preferred, with a fallback to `en` translated. See [youtube/_base.py](https://github.com/yt-dlp/yt-dlp/blob/415b4c9f955b1a0391204bd24a7132590e7b3bdb/yt_dlp/extractor/youtube/_base.py#L402-L409) for the list of supported content language codes* `skip`: One or more of `hls`, `dash` or `translated_subs` to skip extraction of the m3u8 manifests, dash manifests and [auto-translated subtitles](https://github.com/yt-dlp/yt-dlp/issues/4090#issuecomment-1158102032) respectively* `player_client`: Clients to extract video data from. The currently available clients are `web`, `web_safari`, `web_embedded`, `web_music`, `web_creator`, `mweb`, `ios`, `android`, `android_vr`, `tv`, `tv_simply` and `tv_embedded`. By default, `tv,ios,web` is used, or `tv,web` is used when authenticating with cookies. The `web_music` client is added for `music.youtube.com` URLs when logged-in cookies are used. The `web_embedded` client is added for age-restricted videos but only works if the video is embeddable. The `tv_embedded` and `web_creator` clients are added for age-restricted videos if account age-verification is required. Some clients, such as `web` and `web_music`, require a `po_token` for their formats to be downloadable. Some clients, such as `web_creator`, will only work with authentication. Not all clients support authentication via cookies. You can use `default` for the default clients, or you can use `all` for all clients (not recommended). You can prefix a client with `-` to exclude it, e.g. `youtube:player_client=default,-ios`* `player_skip`: Skip some network requests that are generally needed for robust extraction. One or more of `configs` (skip client configs), `webpage` (skip initial webpage), `js` (skip js player), `initial_data` (skip initial data/next ep request). While these options can help reduce the number of requests needed or avoid some rate-limiting, they could cause issues such as missing formats or metadata. See [#860](https://github.com/yt-dlp/yt-dlp/pull/860) and [#12826](https://github.com/yt-dlp/yt-dlp/issues/12826) for more detailsdiff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.pyindex ea6264a0d6..309489672e 100644--- a/yt_dlp/YoutubeDL.py+++ b/yt_dlp/YoutubeDL.py@@ -490,7 +490,7 @@ class YoutubeDL:The template is mapped on a dictionary with keys 'progress' and 'info'retry_sleep_functions: Dictionary of functions that takes the number of attemptsas argument and returns the time to sleep in seconds.- Allowed keys are 'http', 'fragment', 'file_access'+ Allowed keys are 'http', 'fragment', 'file_access', 'extractor'download_ranges: A callback function that gets called for every video withthe signature (info_dict, ydl) -> Iterable[Section].Only the returned sections will be downloaded.diff --git a/yt_dlp/extractor/douyutv.py b/yt_dlp/extractor/douyutv.pyindex e36eac9193..68ace240c7 100644--- a/yt_dlp/extractor/douyutv.py+++ b/yt_dlp/extractor/douyutv.py@@ -206,7 +206,7 @@ class DouyuTVIE(DouyuBaseIE):'is_live': True,**traverse_obj(room, {'display_id': ('url', {str}, {lambda i: i[1:]}),- 'title': ('room_name', {unescapeHTML}),+ 'title': ('room_name', {str}, {unescapeHTML}),'description': ('show_details', {str}),'uploader': ('nickname', {str}),'thumbnail': ('room_src', {url_or_none}),diff --git a/yt_dlp/extractor/qqmusic.py b/yt_dlp/extractor/qqmusic.pyindex fb46e0d124..56a8e7300a 100644--- a/yt_dlp/extractor/qqmusic.py+++ b/yt_dlp/extractor/qqmusic.py@@ -15,7 +15,6 @@ from ..utils import (str_or_none,strip_jsonp,traverse_obj,- unescapeHTML,url_or_none,urljoin,)@@ -425,7 +424,7 @@ class QQMusicPlaylistIE(QQPlaylistBaseIE):return self.playlist_result(entries, list_id, **traverse_obj(list_json, ('cdlist', 0, {'title': ('dissname', {str}),- 'description': ('desc', {unescapeHTML}, {clean_html}),+ 'description': ('desc', {clean_html}),})))diff --git a/yt_dlp/extractor/vk.py b/yt_dlp/extractor/vk.pyindex c269802b37..8a106adb97 100644--- a/yt_dlp/extractor/vk.py+++ b/yt_dlp/extractor/vk.py@@ -548,21 +548,21 @@ class VKIE(VKBaseIE):'formats': formats,'subtitles': subtitles,**traverse_obj(mv_data, {- 'title': ('title', {unescapeHTML}),+ 'title': ('title', {str}, {unescapeHTML}),'description': ('desc', {clean_html}, filter),'duration': ('duration', {int_or_none}),'like_count': ('likes', {int_or_none}),'comment_count': ('commcount', {int_or_none}),}),**traverse_obj(data, {- 'title': ('md_title', {unescapeHTML}),+ 'title': ('md_title', {str}, {unescapeHTML}),'description': ('description', {clean_html}, filter),'thumbnail': ('jpg', {url_or_none}),- 'uploader': ('md_author', {unescapeHTML}),+ 'uploader': ('md_author', {str}, {unescapeHTML}),'uploader_id': (('author_id', 'authorId'), {str_or_none}, any),'duration': ('duration', {int_or_none}),'chapters': ('time_codes', lambda _, v: isinstance(v['time'], int), {- 'title': ('text', {unescapeHTML}),+ 'title': ('text', {str}, {unescapeHTML}),'start_time': 'time',}),}),