youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 4d454c5e4b7ecfae97ff109e05453f43d7cea0a2
parent 5c2191a6053cb5b1210cef68406e8a52e86fd9fd
Author: Sergey M․ <dstftw@gmail.com>
Date:   Sat, 30 May 2015 15:15:42 +0600

[vgtv] Check for inactive videos

Diffstat:
Myoutube_dl/extractor/vgtv.py | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/youtube_dl/extractor/vgtv.py b/youtube_dl/extractor/vgtv.py @@ -4,7 +4,10 @@ from __future__ import unicode_literals import re from .common import InfoExtractor -from ..utils import float_or_none +from ..utils import ( + ExtractorError, + float_or_none, +) class VGTVIE(InfoExtractor): @@ -97,6 +100,10 @@ class VGTVIE(InfoExtractor): % (host, video_id, HOST_WEBSITES[host]), video_id, 'Downloading media JSON') + if data.get('status') == 'inactive': + raise ExtractorError( + 'Video %s is no longer available' % video_id, expected=True) + streams = data['streamUrls'] formats = []