better jq invocation
This commit is contained in:
parent
8aaeb0ae31
commit
08a6cdc508
4
ripper
4
ripper
@ -88,8 +88,8 @@ for channel_id in $IDs; do
|
|||||||
echo "Is https://youtube.com/channel/$channel_id still up?"
|
echo "Is https://youtube.com/channel/$channel_id still up?"
|
||||||
else
|
else
|
||||||
#Only try to download videos, not sheduled livestreams
|
#Only try to download videos, not sheduled livestreams
|
||||||
echo "$json" | jq '.items[] | select(.snippet.liveBroadcastContent != "upcoming") | .id.videoId' |
|
echo "$json" | jq '.items[] | select(.snippet.liveBroadcastContent != "upcoming") | select(.id.videoId != null) |.id.videoId' |
|
||||||
tr -d '"' | grep -v '^null$'|
|
tr -d '"' |
|
||||||
sed 's/^/https:\/\/www\.youtube\.com\/watch\?v=/' |
|
sed 's/^/https:\/\/www\.youtube\.com\/watch\?v=/' |
|
||||||
grep -vf "$BLACKLIST" >> /tmp/todownload$$
|
grep -vf "$BLACKLIST" >> /tmp/todownload$$
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user