From 164fe205de37a1ada826349370aac3e9cd399898 Mon Sep 17 00:00:00 2001 From: bthrx Date: Fri, 15 Mar 2024 22:18:24 -0400 Subject: [PATCH] modified yt to also accept urls via stdin --- installer/client/cli/yt.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/installer/client/cli/yt.py b/installer/client/cli/yt.py index 0ae3bbb..ff45be4 100644 --- a/installer/client/cli/yt.py +++ b/installer/client/cli/yt.py @@ -7,6 +7,7 @@ import os import json import isodate import argparse +import sys def get_video_id(url): @@ -82,4 +83,8 @@ def main(): parser.add_argument('--transcript', action='store_true', help='Output only the transcript') args = parser.parse_args() + + if args.url is None: + args.url = sys.stdin.readline().strip() + main_function(args.url, args)