mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 09:01:43 +00:00
[vgtv] Check for inactive videos
This commit is contained in:
parent
5c2191a605
commit
4d454c5e4b
@ -4,7 +4,10 @@
|
||||
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 @@ def _real_extract(self, url):
|
||||
% (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 = []
|
||||
|
Loading…
Reference in New Issue
Block a user