]> jfr.im git - yt-dlp.git/blame - youtube_dl/extractor/viceland.py
[youtube] Extract episode metadata (closes #9695, closes #11774)
[yt-dlp.git] / youtube_dl / extractor / viceland.py
CommitLineData
d2ac0467
RA
1# coding: utf-8
2from __future__ import unicode_literals
3
b811b4c9 4from .vice import ViceBaseIE
d2ac0467 5
d2ac0467 6
b811b4c9 7class VicelandIE(ViceBaseIE):
d2ac0467
RA
8 _VALID_URL = r'https?://(?:www\.)?viceland\.com/[^/]+/video/[^/]+/(?P<id>[a-f0-9]+)'
9 _TEST = {
d2ac0467
RA
10 'url': 'https://www.viceland.com/en_us/video/cyberwar-trailer/57608447973ee7705f6fbd4e',
11 'info_dict': {
12 'id': '57608447973ee7705f6fbd4e',
13 'ext': 'mp4',
9fa57892
RA
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',
d2ac0467
RA
21 },
22 'params': {
23 # m3u8 download
24 'skip_download': True,
25 },
24eb13b1 26 'add_ie': ['UplynkPreplay'],
d2ac0467 27 }
b811b4c9 28 _PREPLAY_HOST = 'www.viceland'
d2ac0467
RA
29
30 def _real_extract(self, url):
31 video_id = self._match_id(url)
d2ac0467 32 webpage = self._download_webpage(url, video_id)
b811b4c9 33 return self._extract_preplay_video(url, webpage)