commit 6d5b16f9f6a9036a59e9e3d551a98a56a8e9536e parent 0504e9070c6b14c592976b5a06444a689d0477aa Author: ramrunner <dsp@2f30.org> Date: Mon, 13 Feb 2017 11:06:14 -0700 rewording json output from id to url for the video content Diffstat:
M | ytgrep | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ytgrep b/ytgrep @@ -15,7 +15,7 @@ search() { else sstr=$1 fi - curl -s -G "https://www.googleapis.com/youtube/v3/search" -d part="snippet" -d q=$sstr -d maxResults=$NRES -d key=$KEY | jq '[.items[] | {"title":.snippet.title, "id": ["https://www.youtube.com/watch?v=" + .id.videoId] }]' - + curl -s -G "https://www.googleapis.com/youtube/v3/search" -d part="snippet" -d q=$sstr -d maxResults=$NRES -d key=$KEY | jq '[.items[] | {"title":.snippet.title, "url": ["https://www.youtube.com/watch?v=" + .id.videoId] }]' - } command -v jq >/dev/null || {