diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index 7265f78ccb4e..c56ef73a6553 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -495,10 +495,10 @@ def report_unplayable_conflict(opt_name, arg, default=False, allowed=None): if len(dur) == 2 and all(t is not None for t in dur): remove_ranges.append(tuple(dur)) continue - #parser.error(f'invalid --remove-chapters time range {regex!r}. Must be of the form *start-end') + # parser.error(f'invalid --remove-chapters time range {regex!r}. Must be of the form *start-end') try: remove_chapters_patterns.append(re.compile(regex)) - except re.error as err: + except re.error: pass # parser.error(f'invalid --remove-chapters regex {regex!r} - {err}') if opts.remove_chapters: @@ -581,9 +581,6 @@ def report_unplayable_conflict(opt_name, arg, default=False, allowed=None): 'when': when, }) - def report_args_compat(arg, name): - warnings.append('%s given without specifying name. The arguments will be given to all %s' % (arg, name)) - if 'default' in opts.external_downloader_args: report_args_compat('--downloader-args', 'external downloaders') @@ -798,6 +795,13 @@ def get_postprocessors(opts): 'only_multi_video': opts.concat_playlist != 'always', 'when': 'playlist', } + if opts.group: + yield { + 'key': 'Rename', + 'group': opts.group, + # Run this only after the files have been moved to their final locations + 'when': 'after_move' + } # Exec must be the last PP of each category for when, exec_cmd in opts.exec_cmd.items(): yield { diff --git a/yt_dlp/extractor/docubay.py b/yt_dlp/extractor/docubay.py index 9d722d3aa0d0..a829f909652d 100755 --- a/yt_dlp/extractor/docubay.py +++ b/yt_dlp/extractor/docubay.py @@ -1,5 +1,6 @@ from .common import InfoExtractor + class DocubayIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?docubay\.com/[^#/?$]+-(?P\d+)' @@ -18,9 +19,11 @@ class DocubayIE(InfoExtractor): def _real_extract(self, url): video_id = self._match_id(url) - data_json = self._parse_json(self._download_json(self._API_URL, video_id, - headers={'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}, - data=f'cid={video_id}&action=st&type=video'.encode()), video_id) + data_json = self._parse_json(self._download_json( + self._API_URL, + video_id, + headers={'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + data=f'cid={video_id}&action=st&type=video'.encode()), video_id) formats, subtitles = self._extract_m3u8_formats_and_subtitles(data_json['url']['video_url'], video_id) subs = {} @@ -53,6 +56,3 @@ def _real_extract(self, url): 'subtitles': subtitles } - - -