X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fscreencast.py;h=dfd897ba3a3f0a7297164fb315e4543bb597d678;hb=5f0d813d9395848e92a1c6d83335360652d654c1;hp=ba69739b2b104b60531c0363fd81347a812ebc9c;hpb=40c696e5c6e01bd94ae0d5f17ef77c368588106c;p=youtube-dl diff --git a/youtube_dl/extractor/screencast.py b/youtube_dl/extractor/screencast.py index ba69739b2..dfd897ba3 100644 --- a/youtube_dl/extractor/screencast.py +++ b/youtube_dl/extractor/screencast.py @@ -1,14 +1,14 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -import re - from .common import InfoExtractor -from ..utils import ( - ExtractorError, +from ..compat import ( compat_parse_qs, compat_urllib_request, ) +from ..utils import ( + ExtractorError, +) class ScreencastIE(InfoExtractor): @@ -43,12 +43,21 @@ class ScreencastIE(InfoExtractor): 'description': 'Provides a demo of a CommunityViz export to Google Earth, one of the 3D viewing options.', 'thumbnail': 're:^https?://.*\.(?:gif|jpg)$', } + }, { + 'url': 'http://www.screencast.com/t/X3ddTrYh', + 'md5': '669ee55ff9c51988b4ebc0877cc8b159', + 'info_dict': { + 'id': 'X3ddTrYh', + 'ext': 'wmv', + 'title': 'Toolkit 6 User Group Webinar (2014-03-04) - Default Judgment and First Impression', + 'description': 'md5:7b9f393bc92af02326a5c5889639eab0', + 'thumbnail': 're:^https?://.*\.(?:gif|jpg)$', + } }, ] def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - video_id = mobj.group('id') + video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) video_url = self._html_search_regex( @@ -59,6 +68,12 @@ class ScreencastIE(InfoExtractor): flash_vars_s = self._html_search_regex( r'>(.*?)<', + [r'Title: ([^<]*)', + r'class="tabSeperator">>(.*?)<'], webpage, 'title') thumbnail = self._og_search_thumbnail(webpage) description = self._og_search_description(webpage, default=None)