projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c2191a
)
[vgtv] Check for inactive videos
author
Sergey M․
<dstftw@gmail.com>
Sat, 30 May 2015 09:15:42 +0000
(15:15 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 30 May 2015 09:15:42 +0000
(15:15 +0600)
youtube_dl/extractor/vgtv.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/vgtv.py
b/youtube_dl/extractor/vgtv.py
index 65429843113c6701513cda3934103c9dcb534a36..472feb7f03ca3b1f6955ef88e8991a8687d6cd92 100644
(file)
--- 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 = []