does not list upcoming livestreams as videos to download anymore

This commit is contained in:
Alexander Bocken 2021-04-09 13:41:08 +02:00
parent 5d1a780ce4
commit 59365f6a5e
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

6
ripper
View File

@ -77,7 +77,11 @@ for el in root.iter():
sed 's/^/https:\/\/www\.youtube\.com\/watch\?v=/' | grep -vf "$BLACKLIST" >> /tmp/todownload$$
rm -f "/tmp/${channel_id}.xml"
else
echo "$json" | jq '."items"[].id."videoId"' | tr -d '"' | grep -v '^null$'| sed 's/^/https:\/\/www\.youtube\.com\/watch\?v=/' | grep -vf "$BLACKLIST" >> /tmp/todownload$$
#Only try to download videos, not sheduled livestreams
echo "$json" | jq '.items[] | select(.snippet.liveBroadcastContent != "upcoming") | .id.videoId' |
tr -d '"' | grep -v '^null$'|
sed 's/^/https:\/\/www\.youtube\.com\/watch\?v=/' |
grep -vf "$BLACKLIST" >> /tmp/todownload$$
fi
done
grep 'youtube' "$DLARCHIVE" | sed 's/youtube /https:\/\/www\.youtube\.com\/watch?v=/' > /tmp/alreadydownloaded$$