fixed yt...again

This commit is contained in:
Jonathan Dunn 2024-03-14 14:29:56 -04:00
parent b11f6da045
commit 823f3b2f56

View File

@ -74,13 +74,12 @@ def main_function(url, options):
def main():
parser = argparse.ArgumentParser(
description='yt (video meta) extracts metadata about a video, such as the transcript and the video\'s duration. By Daniel Miessler.')
parser.add_argument('url', nargs='?', help='YouTube video URL')
# Ensure 'url' is defined once
parser.add_argument('url', help='YouTube video URL')
parser.add_argument('--duration', action='store_true',
help='Output only the duration')
parser.add_argument('--transcript', action='store_true',
help='Output only the transcript')
parser.add_argument("url", nargs="?", help="YouTube video URL")
args = parser.parse_args()
main_function(args.url, args)