[vidme] Better error message for suspended vidme videos
authorLukáš Lalinský <lukas@oxygene.sk>
Sat, 17 Oct 2015 16:52:25 +0000 (18:52 +0200)
committerLukáš Lalinský <lukas@oxygene.sk>
Sat, 17 Oct 2015 16:52:25 +0000 (18:52 +0200)
youtube_dl/extractor/vidme.py

index 078d283b23b42a8b2c668fbd40caebde0763581c..81dcaa231f911be1849fb07c5a13bf98f37c75d4 100644 (file)
@@ -114,6 +114,12 @@ class VidmeIE(InfoExtractor):
 
         video = response['video']
 
+        if video.get('state') == 'user-disabled':
+            raise ExtractorError(
+                'Vidme said: This video has been suspended either due to a copyright claim, '
+                'or for violating the terms of use.',
+                expected=True)
+
         formats = [{
             'format_id': f.get('type'),
             'url': f['uri'],