commit fddf2d0
hovercats
·
2023-06-02 09:57:26 +0000 UTC
parent 0a3e695
rc/ytdl: works, but needs more work
1 files changed,
+14,
-0
A
rc/ytdl
A
rc/ytdl
+14,
-0
1@@ -0,0 +1,14 @@
2+#!/bin/rc
3+
4+# Simple script to download videos
5+# Requires yt-dlp
6+
7+DLDIR=$HOME/usr/vid
8+
9+if (test -z $1){
10+ printf 'No url found\n'
11+ exit 1
12+}
13+
14+val=`{yt-dlp -F $1 | grep '1080p' | tail -n 1 | awk '{print $1}'}
15+yt-dlp -P $DLDIR -f $val+bestaudio $1