1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-04 12:04:46 -04:00

[cleanup] Misc cleanup

Closes #1942 #1976 #2020 #2058 #1984
This commit is contained in:
pukkandan
2021-12-23 07:12:26 +05:30
parent e0fd95737d
commit b69fd25c25
30 changed files with 109 additions and 68 deletions

View File

@@ -18,6 +18,7 @@ from .options import (
)
from .compat import (
compat_getpass,
compat_os_name,
compat_shlex_quote,
workaround_optparse_bug9161,
)
@@ -95,7 +96,8 @@ def _real_main(argv=None):
if opts.batchfile is not None:
try:
if opts.batchfile == '-':
write_string('Reading URLs from stdin:\n')
write_string('Reading URLs from stdin - EOF (%s) to end:\n' % (
'Ctrl+Z' if compat_os_name == 'nt' else 'Ctrl+D'))
batchfd = sys.stdin
else:
batchfd = io.open(
@@ -518,7 +520,7 @@ def _real_main(argv=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: