]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/viceland.py
debian/patches: Drop patch included in version 2017.02.07.
[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/cyberwar-trailer/57608447973ee7705f6fbd4e',
11 'info_dict': {
12 'id': '57608447973ee7705f6fbd4e',
13 'ext': 'mp4',
14 'title': 'CYBERWAR (Trailer)',
15 '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.',
16 'age_limit': 14,
17 'timestamp': 1466008539,
18 'upload_date': '20160615',
19 'uploader_id': '11',
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)