historical/notube2.git/notube2.sh

4 lines
183 B
Bash
Raw Normal View History

2024-01-16 11:20:27 -06:00
search="${1// /%20}"
yt=$(curl "https://vid.puffyan.us/search?q=$search" | grep "youtube.com/watch?v=" | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | sort -u | head -n 1)
mpv $yt