]> jfr.im git - yt-dlp.git/blame - youtube_dl/extractor/makertv.py
release 2017.01.25
[yt-dlp.git] / youtube_dl / extractor / makertv.py
CommitLineData
77302fe5 1# coding: utf-8
2from __future__ import unicode_literals
3
4from .common import InfoExtractor
5
6
7class MakerTVIE(InfoExtractor):
7cb09524 8 _VALID_URL = r'https?://(?:(?:www\.)?maker\.tv/(?:[^/]+/)*video|makerplayer.com/embed/maker)/(?P<id>[a-zA-Z0-9]{12})'
77302fe5 9 _TEST = {
10 'url': 'http://www.maker.tv/video/Fh3QgymL9gsc',
11 'md5': 'ca237a53a8eb20b6dc5bd60564d4ab3e',
12 'info_dict': {
7cb09524 13 'id': 'Fh3QgymL9gsc',
77302fe5 14 'ext': 'mp4',
15 'title': 'Maze Runner: The Scorch Trials Official Movie Review',
16 'description': 'md5:11ff3362d7ef1d679fdb649f6413975a',
17 'upload_date': '20150918',
18 'timestamp': 1442549540,
19 }
20 }
21
22 def _real_extract(self, url):
23 video_id = self._match_id(url)
24 webpage = self._download_webpage(url, video_id)
7cb09524 25 jwplatform_id = self._search_regex(r'jw_?id="([^"]+)"', webpage, 'jwplatform id')
77302fe5 26
7cb09524 27 return {
28 '_type': 'url_transparent',
29 'id': video_id,
30 'url': 'jwplatform:%s' % jwplatform_id,
31 'ie_key': 'JWPlatform',
32 }