[adobepass] add IE suffix to the extractor and remove duplicate constant
[youtube-dl] / youtube_dl / extractor / viceland.py
index c66e8eb9580923719e1661f0a84b5fa49dcfe345..8742b607a4a8dcbbf6b2790fa40ca29353b04de2 100644 (file)
@@ -5,7 +5,7 @@ import time
 import hashlib
 import json
 
-from .adobepass import AdobePass
+from .adobepass import AdobePassIE
 from ..compat import compat_HTTPError
 from ..utils import (
     int_or_none,
@@ -17,20 +17,26 @@ from ..utils import (
 )
 
 
-class VicelandIE(AdobePass):
+class VicelandIE(AdobePassIE):
     _VALID_URL = r'https?://(?:www\.)?viceland\.com/[^/]+/video/[^/]+/(?P<id>[a-f0-9]+)'
     _TEST = {
-        # FIXME: fill the test after fixing delegation problem
         'url': 'https://www.viceland.com/en_us/video/cyberwar-trailer/57608447973ee7705f6fbd4e',
         'info_dict': {
             'id': '57608447973ee7705f6fbd4e',
             'ext': 'mp4',
+            'title': 'CYBERWAR (Trailer)',
+            'description': 'Tapping into the geopolitics of hacking and surveillance, Ben Makuch travels the world to meet with hackers, government officials, and dissidents to investigate the ecosystem of cyberwarfare.',
+            'age_limit': 14,
+            'timestamp': 1466008539,
+            'upload_date': '20160615',
+            'uploader_id': '11',
+            'uploader': 'Viceland',
         },
         'params': {
             # m3u8 download
             'skip_download': True,
         },
-        'add_ie': ['UplynkPreplay', 'Uplynk'],
+        'add_ie': ['UplynkPreplay'],
     }
 
     def _real_extract(self, url):
@@ -64,6 +70,7 @@ class VicelandIE(AdobePass):
             if isinstance(e.cause, compat_HTTPError) and e.cause.code == 400:
                 error = json.loads(e.cause.read().decode())
                 raise ExtractorError('%s said: %s' % (self.IE_NAME, error['details']), expected=True)
+            raise
 
         video_data = preplay['video']
         base = video_data['base']