3 from .common
import InfoExtractor
4 from ..utils
import traverse_obj
, update_url_query
7 class ScreencastifyIE(InfoExtractor
):
9 r
'https?://watch\.screencastify\.com/v/(?P<id>[^/?#]+)',
10 r
'https?://app\.screencastify\.com/v[23]/watch/(?P<id>[^/?#]+)',
13 'url': 'https://watch.screencastify.com/v/sYVkZip3quLKhHw4Ybk8',
15 'id': 'sYVkZip3quLKhHw4Ybk8',
17 'title': 'Inserting and Aligning the Case Top and Bottom',
19 'uploader': 'Paul Gunn',
20 'extra_param_to_segment_url': str,
23 'skip_download': 'm3u8',
26 'url': 'https://app.screencastify.com/v3/watch/J5N7H11wofDN1jZUCr3t',
28 'id': 'J5N7H11wofDN1jZUCr3t',
30 'uploader': 'Scott Piesen',
32 'title': 'Lesson Recording 1-17 Burrr...',
35 'skip_download': 'm3u8',
38 'url': 'https://app.screencastify.com/v2/watch/BQ26VbUdfbQLhKzkktOk',
39 'only_matching': True,
42 def _real_extract(self
, url
):
43 video_id
= self
._match
_id
(url
)
44 info
= self
._download
_json
(
45 f
'https://umbrella.svc.screencastify.com/api/umbrellaService/watch/{video_id}', video_id
)
47 query_string
= traverse_obj(info
, ('manifest', 'auth', 'query'))
48 query
= urllib
.parse
.parse_qs(query_string
)
50 dash_manifest_url
= traverse_obj(info
, ('manifest', 'url'))
53 self
._extract
_mpd
_formats
(
54 dash_manifest_url
, video_id
, mpd_id
='dash', query
=query
, fatal
=False))
55 hls_manifest_url
= traverse_obj(info
, ('manifest', 'hlsUrl'))
58 self
._extract
_m
3u8_formats
(
59 hls_manifest_url
, video_id
, ext
='mp4', m3u8_id
='hls', query
=query
, fatal
=False))
61 f
['url'] = update_url_query(f
['url'], query
)
65 'title': info
.get('title'),
66 'description': info
.get('description'),
67 'uploader': info
.get('userName'),
69 'extra_param_to_segment_url': query_string
,