]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/viceland.py
87f9216b5da6965cf5b9aa163040ac42ce7baae4
[youtubedl] / youtube_dl / extractor / viceland.py
1 # coding: utf-8
2 from __future__ import unicode_literals
3
4 from .vice import ViceBaseIE
5
6
7 class VicelandIE(ViceBaseIE):
8 _VALID_URL = r'https?://(?:www\.)?viceland\.com/[^/]+/video/[^/]+/(?P<id>[a-f0-9]+)'
9 _TEST = {
10 'url': 'https://www.viceland.com/en_us/video/trapped/588a70d0dba8a16007de7316',
11 'info_dict': {
12 'id': '588a70d0dba8a16007de7316',
13 'ext': 'mp4',
14 'title': 'TRAPPED (Series Trailer)',
15 'description': 'md5:7a8e95c2b6cd86461502a2845e581ccf',
16 'age_limit': 14,
17 'timestamp': 1485474122,
18 'upload_date': '20170126',
19 'uploader_id': '57a204098cb727dec794c6a3',
20 'uploader': 'Viceland',
21 },
22 'params': {
23 # m3u8 download
24 'skip_download': True,
25 },
26 'add_ie': ['UplynkPreplay'],
27 }
28 _PREPLAY_HOST = 'www.viceland'
29
30 def _real_extract(self, url):
31 video_id = self._match_id(url)
32 webpage = self._download_webpage(url, video_id)
33 return self._extract_preplay_video(url, webpage)