aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/makertv.py
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2015-10-15 23:27:46 +0100
committerremitamine <remitamine@gmail.com>2015-10-15 23:27:46 +0100
commit77302fe5c989b9cafcb675c0a03642b80fa557ff (patch)
tree12ab95f45b534f2e284307a99165992bfba9ee42 /youtube_dl/extractor/makertv.py
parentfafc7950e2230bf25ac7c7563f1704cf8f134f64 (diff)
downloadyoutube-dl-77302fe5c989b9cafcb675c0a03642b80fa557ff.tar.xz
[bliptv] remove extractor and add support for site replacement(makertv)
Diffstat (limited to 'youtube_dl/extractor/makertv.py')
-rw-r--r--youtube_dl/extractor/makertv.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/youtube_dl/extractor/makertv.py b/youtube_dl/extractor/makertv.py
new file mode 100644
index 000000000..0256e4e24
--- /dev/null
+++ b/youtube_dl/extractor/makertv.py
@@ -0,0 +1,27 @@
+# coding: utf-8
+from __future__ import unicode_literals
+
+from .common import InfoExtractor
+
+
+class MakerTVIE(InfoExtractor):
+ _VALID_URL = r'https?://(?:(?:www\.)?maker\.tv/(?:[^/]+/)?video|http://makerplayer.com/embed/maker)/(?P<id>[a-zA-Z0-9]{12})'
+ _TEST = {
+ 'url': 'http://www.maker.tv/video/Fh3QgymL9gsc',
+ 'md5': 'ca237a53a8eb20b6dc5bd60564d4ab3e',
+ 'info_dict': {
+ 'id': 'brOEcGut',
+ 'ext': 'mp4',
+ 'title': 'Maze Runner: The Scorch Trials Official Movie Review',
+ 'description': 'md5:11ff3362d7ef1d679fdb649f6413975a',
+ 'upload_date': '20150918',
+ 'timestamp': 1442549540,
+ }
+ }
+
+ def _real_extract(self, url):
+ video_id = self._match_id(url)
+ webpage = self._download_webpage(url, video_id)
+ jwplatform_id = self._search_regex([r'jwid="([^"]+)"', r'Maker.jw_id\s*=\s*"([^"]+)";'], webpage, 'jwplatform id')
+
+ return self.url_result('jwplatform:%s' % jwplatform_id, 'JWPlatform')