mirror of
https://github.com/danielmiessler/fabric
synced 2024-11-10 07:10:31 +00:00
Merge pull request #258 from bthrx/yt-stdin
modified yt to also accept urls via stdin
This commit is contained in:
commit
371f16fac9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user