[vube] Add DMCA notice
authorSergey M <dstftw@gmail.com>
Thu, 25 Sep 2014 13:48:54 +0000 (20:48 +0700)
committerSergey M <dstftw@gmail.com>
Thu, 25 Sep 2014 13:48:54 +0000 (20:48 +0700)
youtube_dl/extractor/vube.py

index 2544c24bd16e4af7b3fba806dff1b87530759f82..bcca4897a2ec2ad74bdea02e827ad6e42df0e132 100644 (file)
@@ -6,6 +6,7 @@ from .common import InfoExtractor
 from ..utils import (
     int_or_none,
     compat_str,
+    ExtractorError,
 )
 
 
@@ -102,6 +103,11 @@ class VubeIE(InfoExtractor):
 
         self._sort_formats(formats)
 
+        if not formats and video.get('vst') == 'dmca':
+            raise ExtractorError(
+                'This video has been removed in response to a complaint received under the US Digital Millennium Copyright Act.',
+                expected=True)
+
         title = video['title']
         description = video.get('description')
         thumbnail = self._proto_relative_url(video.get('thumbnail_src'), scheme='http:')