summaryrefslogtreecommitdiff
path: root/yts
diff options
context:
space:
mode:
authorArthur Melton <amtitan@icloud.com>2022-12-05 09:48:18 -0500
committerGitHub <noreply@github.com>2022-12-05 09:48:18 -0500
commit136afb9745eae3bea8bb7008542c96ffd17ad12e (patch)
tree6cb5f7908e31d260a8e2d9750c7fdaa4ba4aef11 /yts
parent8d86039abda2283b332a61d620688033c51dceb7 (diff)
dont try and make tmp file
Diffstat (limited to 'yts')
-rwxr-xr-xyts1
1 files changed, 0 insertions, 1 deletions
diff --git a/yts b/yts
index 72a123b..6c41a58 100755
--- a/yts
+++ b/yts
@@ -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)