diff --git a/ytloop.sh b/ytloop.sh new file mode 100755 index 0000000..870e7e2 --- /dev/null +++ b/ytloop.sh @@ -0,0 +1,3 @@ +VID=$1 +vlc $VID +./ytscroll.sh `./ytrelated.sh $VID` diff --git a/ytrelated.sh b/ytrelated.sh new file mode 100755 index 0000000..7e488ed --- /dev/null +++ b/ytrelated.sh @@ -0,0 +1,4 @@ +for video in `curl $1|tr '"' '\n'|grep '^/watch?'|cut -d'\' -f1|sort -u` +do + ./ytmeta.sh https://www.youtube.com$video +done|./ytlist.sh diff --git a/ytscroll.sh b/ytscroll.sh new file mode 100755 index 0000000..03de32d --- /dev/null +++ b/ytscroll.sh @@ -0,0 +1,2 @@ +VID=`./ytsearch.sh $@` +vlc $VID && ./ytloop.sh $VID diff --git a/ytsearch.sh b/ytsearch.sh index 1d73214..d5677a2 100755 --- a/ytsearch.sh +++ b/ytsearch.sh @@ -1,2 +1,2 @@ -for vid in `curl https://www.youtube.com/results?search_query=$(echo $@|tr ' ' '+')|tr '"' '\n'|grep 'watch?'|cut -d '\' -f1|sort|uniq`; do ./ytmeta.sh youtube.com$vid ; done|./ytlist.sh ^C +for vid in `curl https://www.youtube.com/results?search_query=$(echo $@|tr ' ' '+')|tr '"' '\n'|grep '^/watch?'|cut -d '\' -f1|sort|uniq`; do ./ytmeta.sh youtube.com$vid ; done|./ytlist.sh