From 9b015c9ca495a0e7d2294a4923c9da55d53d3072 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sat, 2 Jan 2021 12:25:19 +0100 Subject: [PATCH] reject null videoIds --- .local/bin/tools/ripper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/tools/ripper b/.local/bin/tools/ripper index cd3bb21..acd8fcb 100755 --- a/.local/bin/tools/ripper +++ b/.local/bin/tools/ripper @@ -45,7 +45,7 @@ if [ -n "$not_correctly_formatted" ]; then fi for channel_id in $IDs; do echo "ID: $channel_id" - curl -s "https://www.googleapis.com/youtube/v3/search?key=$APIKEY&channelId=$channel_id&part=snippet,id&order=date&maxResults=500" | jq '."items" | .[] | .id."videoId"' | tr -d '"' | sed 's/^/https:\/\/www\.youtube\.com\/watch\?v=/' | grep -vf "$BLACKLIST" >> /tmp/todownload$$ + curl -s "https://www.googleapis.com/youtube/v3/search?key=$APIKEY&channelId=$channel_id&part=snippet,id&order=date&maxResults=500" | jq '."items" | .[] | .id."videoId"' | tr -d '"' | grep -v '^null$'| sed 's/^/https:\/\/www\.youtube\.com\/watch\?v=/' | grep -vf "$BLACKLIST" >> /tmp/todownload$$ done grep 'youtube' "$DLARCHIVE" | sed 's/youtube /https:\/\/www\.youtube\.com\/watch?v=/' > /tmp/alreadydownloaded$$