mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-01-07 17:16:08 +00:00
[wat] detect DRM protected videos(closes #27958)
This commit is contained in:
parent
295860ff00
commit
1631fca1ee
|
@ -64,7 +64,7 @@ class WatIE(InfoExtractor):
|
||||||
if error_desc:
|
if error_desc:
|
||||||
if video_info.get('error_code') == 'GEOBLOCKED':
|
if video_info.get('error_code') == 'GEOBLOCKED':
|
||||||
self.raise_geo_restricted(error_desc, video_info.get('geoList'))
|
self.raise_geo_restricted(error_desc, video_info.get('geoList'))
|
||||||
raise ExtractorError(error_desc)
|
raise ExtractorError(error_desc, expected=True)
|
||||||
|
|
||||||
title = video_info['title']
|
title = video_info['title']
|
||||||
|
|
||||||
|
@ -86,6 +86,8 @@ class WatIE(InfoExtractor):
|
||||||
delivery = video_data.get('delivery') or {}
|
delivery = video_data.get('delivery') or {}
|
||||||
extract_formats({delivery.get('format'): delivery.get('url')})
|
extract_formats({delivery.get('format'): delivery.get('url')})
|
||||||
if not formats:
|
if not formats:
|
||||||
|
if delivery.get('drm'):
|
||||||
|
raise ExtractorError('This video is DRM protected.', expected=True)
|
||||||
manifest_urls = self._download_json(
|
manifest_urls = self._download_json(
|
||||||
'http://www.wat.tv/get/webhtml/' + video_id, video_id, fatal=False)
|
'http://www.wat.tv/get/webhtml/' + video_id, video_id, fatal=False)
|
||||||
if manifest_urls:
|
if manifest_urls:
|
||||||
|
|
Loading…
Reference in a new issue