added check for nuked channels
This commit is contained in:
parent
c337ca7b64
commit
2f12e793bd
10
ripper
10
ripper
@ -67,10 +67,16 @@ for channel_id in $IDs; do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -n "$LEGACYMODE" ];then
|
if [ -n "$LEGACYMODE" ];then
|
||||||
curl -s "https://www.youtube.com/feeds/videos.xml?channel_id=$channel_id" |
|
channelxml="$( curl -s "https://www.youtube.com/feeds/videos.xml?channel_id=$channel_id" )"
|
||||||
xml2 | grep '^/feed/entry/yt:videoId=' |
|
if echo "$channelxml" | grep -q '<title>Error 404 (Not Found)!!1</title>'
|
||||||
|
then
|
||||||
|
echo "Grabbing rss feed for channel failed"
|
||||||
|
echo "Is https://youtube.com/channel/$channel_id still up?"
|
||||||
|
else
|
||||||
|
echo "$channelxml" | xml2 | grep '^/feed/entry/yt:videoId=' |
|
||||||
sed 's|^\/feed\/entry\/yt:videoId=|https:\/\/www\.youtube\.com\/watch\?v=|' |
|
sed 's|^\/feed\/entry\/yt:videoId=|https:\/\/www\.youtube\.com\/watch\?v=|' |
|
||||||
grep -vf "$BLACKLIST" >> /tmp/todownload$$
|
grep -vf "$BLACKLIST" >> /tmp/todownload$$
|
||||||
|
fi
|
||||||
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") | .id.videoId' |
|
||||||
|
Loading…
Reference in New Issue
Block a user