2016-08-14 12:03:42 -05:00
|
|
|
# coding: utf-8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2016-11-03 04:37:07 -05:00
|
|
|
from .vice import ViceBaseIE
|
2016-08-14 12:03:42 -05:00
|
|
|
|
|
|
|
|
2016-11-03 04:37:07 -05:00
|
|
|
class VicelandIE(ViceBaseIE):
|
2016-08-14 12:03:42 -05:00
|
|
|
_VALID_URL = r'https?://(?:www\.)?viceland\.com/[^/]+/video/[^/]+/(?P<id>[a-f0-9]+)'
|
|
|
|
_TEST = {
|
2017-02-18 02:52:43 -06:00
|
|
|
'url': 'https://www.viceland.com/en_us/video/trapped/588a70d0dba8a16007de7316',
|
2016-08-14 12:03:42 -05:00
|
|
|
'info_dict': {
|
2017-02-18 02:52:43 -06:00
|
|
|
'id': '588a70d0dba8a16007de7316',
|
2016-08-14 12:03:42 -05:00
|
|
|
'ext': 'mp4',
|
2017-02-18 02:52:43 -06:00
|
|
|
'title': 'TRAPPED (Series Trailer)',
|
|
|
|
'description': 'md5:7a8e95c2b6cd86461502a2845e581ccf',
|
2016-08-14 13:04:23 -05:00
|
|
|
'age_limit': 14,
|
2017-02-18 02:52:43 -06:00
|
|
|
'timestamp': 1485474122,
|
|
|
|
'upload_date': '20170126',
|
|
|
|
'uploader_id': '57a204098cb727dec794c6a3',
|
2016-08-14 13:04:23 -05:00
|
|
|
'uploader': 'Viceland',
|
2016-08-14 12:03:42 -05:00
|
|
|
},
|
|
|
|
'params': {
|
|
|
|
# m3u8 download
|
|
|
|
'skip_download': True,
|
|
|
|
},
|
2016-08-14 16:45:43 -05:00
|
|
|
'add_ie': ['UplynkPreplay'],
|
2016-08-14 12:03:42 -05:00
|
|
|
}
|
2016-11-03 04:37:07 -05:00
|
|
|
_PREPLAY_HOST = 'www.viceland'
|
2016-08-14 12:03:42 -05:00
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
video_id = self._match_id(url)
|
|
|
|
webpage = self._download_webpage(url, video_id)
|
2016-11-03 04:37:07 -05:00
|
|
|
return self._extract_preplay_video(url, webpage)
|