]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/screencastomatic.py
   2 from __future__ 
import unicode_literals
 
   4 from .common 
import InfoExtractor
 
   5 from ..utils 
import js_to_json
 
   8 class ScreencastOMaticIE(InfoExtractor
): 
   9     _VALID_URL 
= r
'https?://screencast-o-matic\.com/watch/(?P<id>[0-9a-zA-Z]+)' 
  11         'url': 'http://screencast-o-matic.com/watch/c2lD3BeOPl', 
  12         'md5': '483583cb80d92588f15ccbedd90f0c18', 
  16             'title': 'Welcome to 3-4 Philosophy @ DECV!', 
  17             'thumbnail': r
're:^https?://.*\.jpg$', 
  18             'description': 'as the title says! also: some general info re 1) VCE philosophy and 2) distance learning.', 
  23     def _real_extract(self
, url
): 
  24         video_id 
= self
._match
_id
(url
) 
  25         webpage 
= self
._download
_webpage
(url
, video_id
) 
  27         jwplayer_data 
= self
._parse
_json
( 
  29                 r
"(?s)jwplayer\('mp4Player'\).setup\((\{.*?\})\);", webpage
, 'setup code'), 
  30             video_id
, transform_source
=js_to_json
) 
  32         info_dict 
= self
._parse
_jwplayer
_data
(jwplayer_data
, video_id
, require_title
=False) 
  34             'title': self
._og
_search
_title
(webpage
), 
  35             'description': self
._og
_search
_description
(webpage
),