mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-26 18:34:32 +01:00
[vidme] Check for deleted videos
This commit is contained in:
parent
755ff8d22c
commit
5f9f87c06f
@ -101,6 +101,10 @@ class VidmeIE(InfoExtractor):
|
|||||||
# suspended
|
# suspended
|
||||||
'url': 'https://vid.me/Ox3G',
|
'url': 'https://vid.me/Ox3G',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
# deleted
|
||||||
|
'url': 'https://vid.me/KTPm',
|
||||||
|
'only_matching': True,
|
||||||
}, {
|
}, {
|
||||||
# no formats in the API response
|
# no formats in the API response
|
||||||
'url': 'https://vid.me/e5g',
|
'url': 'https://vid.me/e5g',
|
||||||
@ -143,6 +147,11 @@ class VidmeIE(InfoExtractor):
|
|||||||
|
|
||||||
video = response['video']
|
video = response['video']
|
||||||
|
|
||||||
|
if video.get('state') == 'deleted':
|
||||||
|
raise ExtractorError(
|
||||||
|
'Vidme said: Sorry, this video has been deleted.',
|
||||||
|
expected=True)
|
||||||
|
|
||||||
if video.get('state') in ('user-disabled', 'suspended'):
|
if video.get('state') in ('user-disabled', 'suspended'):
|
||||||
raise ExtractorError(
|
raise ExtractorError(
|
||||||
'Vidme said: This video has been suspended either due to a copyright claim, '
|
'Vidme said: This video has been suspended either due to a copyright claim, '
|
||||||
|
Loading…
Reference in New Issue
Block a user