mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-12 20:07:23 +08:00
[vevo] raise error on geo restricted videos
This commit is contained in:
parent
317ec70257
commit
1f87022650
@ -152,7 +152,7 @@ class VevoIE(VevoBaseIE):
|
|||||||
artists.append(value)
|
artists.append(value)
|
||||||
elif key.startswith('%s.streamsV3.' % video_id):
|
elif key.startswith('%s.streamsV3.' % video_id):
|
||||||
video_versions.append(value)
|
video_versions.append(value)
|
||||||
|
|
||||||
if 'streams' in json_data.get('default', {}):
|
if 'streams' in json_data.get('default', {}):
|
||||||
video_versions = json_data['default']['streams'][video_id][0]
|
video_versions = json_data['default']['streams'][video_id][0]
|
||||||
|
|
||||||
@ -171,6 +171,8 @@ class VevoIE(VevoBaseIE):
|
|||||||
version = self._VERSIONS.get(video_version.get('version'), 'generic')
|
version = self._VERSIONS.get(video_version.get('version'), 'generic')
|
||||||
version_url = video_version.get('url')
|
version_url = video_version.get('url')
|
||||||
if not version_url:
|
if not version_url:
|
||||||
|
if video_version.get('errorCode') == 'video-not-viewable-in-country':
|
||||||
|
raise self.raise_geo_restricted()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if '.ism' in version_url:
|
if '.ism' in version_url:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user