]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/makertv.py
Update changelog
[youtubedl] / youtube_dl / extractor / makertv.py
1 # coding: utf-8
2 from __future__ import unicode_literals
3
4 from .common import InfoExtractor
5
6
7 class MakerTVIE(InfoExtractor):
8 _VALID_URL = r'https?://(?:(?:www\.)?maker\.tv/(?:[^/]+/)*video|makerplayer\.com/embed/maker)/(?P<id>[a-zA-Z0-9]{12})'
9 _TEST = {
10 'url': 'http://www.maker.tv/video/Fh3QgymL9gsc',
11 'md5': 'ca237a53a8eb20b6dc5bd60564d4ab3e',
12 'info_dict': {
13 'id': 'Fh3QgymL9gsc',
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)
25 jwplatform_id = self._search_regex(r'jw_?id="([^"]+)"', webpage, 'jwplatform id')
26
27 return {
28 '_type': 'url_transparent',
29 'id': video_id,
30 'url': 'jwplatform:%s' % jwplatform_id,
31 'ie_key': 'JWPlatform',
32 }