diff options
| author | Arthur Melton <amtitan@icloud.com> | 2022-12-05 09:48:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-05 09:48:18 -0500 |
| commit | 136afb9745eae3bea8bb7008542c96ffd17ad12e (patch) | |
| tree | 6cb5f7908e31d260a8e2d9750c7fdaa4ba4aef11 | |
| parent | 8d86039abda2283b332a61d620688033c51dceb7 (diff) | |
dont try and make tmp file
| -rwxr-xr-x | yts | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -1,7 +1,6 @@ #!/bin/bash query=$(echo $* | sed s/\ /+/g) -file=$(mktemp) search=$(curl -sL "www.youtube.com/results?search_query=${query}") watches=($(echo "$search" | grep -Po '"videoRenderer":{"videoId":"([a-zA-Z0-9_-]{11})' | awk -F: '{print $3}' | sed 's/^.//' | uniq | awk '{print "www.youtube.com/watch?v="$0}' | head -n5)) titles=$(echo "$search" | grep -Po '"title":{"runs":\[{"text":.{1,100}"}\],' | awk -F: '{print $4}' | sed 's/....$//' | sed 's/.//' | head -n5) |
