]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/screencastomatic.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
14 class ScreencastOMaticIE(InfoExtractor
):
15 _VALID_URL
= r
'https?://screencast-o-matic\.com/(?:(?:watch|player)/|embed\?.*?\bsc=)(?P<id>[0-9a-zA-Z]+)'
17 'url': 'http://screencast-o-matic.com/watch/c2lD3BeOPl',
18 'md5': '483583cb80d92588f15ccbedd90f0c18',
22 'title': 'Welcome to 3-4 Philosophy @ DECV!',
23 'thumbnail': r
're:^https?://.*\.jpg$',
24 'description': 'as the title says! also: some general info re 1) VCE philosophy and 2) distance learning.',
26 'upload_date': '20141216',
29 'url': 'http://screencast-o-matic.com/player/c2lD3BeOPl',
30 'only_matching': True,
32 'url': 'http://screencast-o-matic.com/embed?ff=true&sc=cbV2r4Q5TL&fromPH=true&a=1',
33 'only_matching': True,
36 def _real_extract(self
, url
):
37 video_id
= self
._match
_id
(url
)
38 webpage
= self
._download
_webpage
(
39 'https://screencast-o-matic.com/player/' + video_id
, video_id
)
40 info
= self
._parse
_html
5_media
_entries
(url
, webpage
, video_id
)[0]
43 'title': get_element_by_class('overlayTitle', webpage
),
44 'description': strip_or_none(get_element_by_class('overlayDescription', webpage
)) or None,
45 'duration': int_or_none(self
._search
_regex
(
46 r
'player\.duration\s*=\s*function\(\)\s*{\s*return\s+(\d+);\s*};',
47 webpage
, 'duration', default
=None)),
48 'upload_date': unified_strdate(remove_start(
49 get_element_by_class('overlayPublished', webpage
), 'Published: ')),