X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fscreencast.py;fp=youtube_dl%2Fextractor%2Fscreencast.py;h=f2ced39c4b97229aaa574da578e2c492f0681518;hb=38ad119f97cba871d34b057050547ba56b3e54c6;hp=0000000000000000000000000000000000000000;hpb=4e415288d73f3ec15a0b2854de79c7359d1ae6fe;p=youtube-dl.git diff --git a/youtube_dl/extractor/screencast.py b/youtube_dl/extractor/screencast.py new file mode 100644 index 000000000..f2ced39c4 --- /dev/null +++ b/youtube_dl/extractor/screencast.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +import re + +from .common import InfoExtractor +from ..utils import ( + compat_parse_qs, + compat_urllib_request, +) + + +class ScreencastIE(InfoExtractor): + _VALID_URL = r'https?://www\.screencast\.com/t/(?P[a-zA-Z0-9]+)' + _TEST = { + 'url': 'http://www.screencast.com/t/3ZEjQXlT', + 'md5': '917df1c13798a3e96211dd1561fded83', + 'info_dict': { + 'id': '3ZEjQXlT', + 'ext': 'm4v', + 'title': 'Color Measurement with Ocean Optics Spectrometers', + 'description': 'md5:240369cde69d8bed61349a199c5fb153', + 'thumbnail': 're:^https?://.*\.jpg$' + } + } + + def _real_extract(self, url): + mobj = re.match(self._VALID_URL, url) + video_id = mobj.group('id') + webpage = self._download_webpage(url, video_id) + + flash_vars_s = self._html_search_regex( + r'