summaryrefslogtreecommitdiff
path: root/yt-dlp-best
diff options
context:
space:
mode:
Diffstat (limited to 'yt-dlp-best')
-rwxr-xr-xyt-dlp-best4
1 files changed, 2 insertions, 2 deletions
diff --git a/yt-dlp-best b/yt-dlp-best
index d4f3f9e..5c2f4cc 100755
--- a/yt-dlp-best
+++ b/yt-dlp-best
@@ -9,8 +9,8 @@ if [ $# -ne 1 ]; then
fi
URL=$1
-
-FMT_LINE=$(yt-dlp -F "${URL}" | tail -n 2 | grep "mp4")
+DESIRED_FMT="mp4"
+FMT_LINE=$(yt-dlp -F "${URL}" | grep "${DESIRED_FMT}" | tail -n 1)
FMT=$(echo ${FMT_LINE} | cut -d" " -f1)