aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukáš Lalinský <lukas@oxygene.sk>2015-10-26 14:42:17 +0100
committerLukáš Lalinský <lukas@oxygene.sk>2015-10-26 14:42:17 +0100
commit5f9f87c06fa819c75e59f5d0d491d191c229abbc (patch)
tree39a45b46d967026995a111217ed3827a7ede890c
parent755ff8d22ca5607400c1232b194e20a004e4e9eb (diff)
downloadyoutube-dl-5f9f87c06fa819c75e59f5d0d491d191c229abbc.tar.xz
[vidme] Check for deleted videos
-rw-r--r--youtube_dl/extractor/vidme.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube_dl/extractor/vidme.py b/youtube_dl/extractor/vidme.py
index eb5cde761..3d63ed4f0 100644
--- a/youtube_dl/extractor/vidme.py
+++ b/youtube_dl/extractor/vidme.py
@@ -102,6 +102,10 @@ class VidmeIE(InfoExtractor):
'url': 'https://vid.me/Ox3G',
'only_matching': True,
}, {
+ # deleted
+ 'url': 'https://vid.me/KTPm',
+ 'only_matching': True,
+ }, {
# no formats in the API response
'url': 'https://vid.me/e5g',
'info_dict': {
@@ -143,6 +147,11 @@ class VidmeIE(InfoExtractor):
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'):
raise ExtractorError(
'Vidme said: This video has been suspended either due to a copyright claim, '