]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/screencastify.py
3 from .common
import InfoExtractor
4 from ..utils
import traverse_obj
, update_url_query
7 class ScreencastifyIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://watch\.screencastify\.com/v/(?P<id>[^/?#]+)'
10 'url': 'https://watch.screencastify.com/v/sYVkZip3quLKhHw4Ybk8',
12 'id': 'sYVkZip3quLKhHw4Ybk8',
14 'title': 'Inserting and Aligning the Case Top and Bottom',
16 'uploader': 'Paul Gunn',
17 'extra_param_to_segment_url': str,
20 'skip_download': 'm3u8',
24 def _real_extract(self
, url
):
25 video_id
= self
._match
_id
(url
)
26 info
= self
._download
_json
(
27 f
'https://umbrella.svc.screencastify.com/api/umbrellaService/watch/{video_id}', video_id
)
29 query_string
= traverse_obj(info
, ('manifest', 'auth', 'query'))
30 query
= urllib
.parse
.parse_qs(query_string
)
32 dash_manifest_url
= traverse_obj(info
, ('manifest', 'url'))
35 self
._extract
_mpd
_formats
(
36 dash_manifest_url
, video_id
, mpd_id
='dash', query
=query
, fatal
=False))
37 hls_manifest_url
= traverse_obj(info
, ('manifest', 'hlsUrl'))
40 self
._extract
_m
3u8_formats
(
41 hls_manifest_url
, video_id
, ext
='mp4', m3u8_id
='hls', query
=query
, fatal
=False))
43 f
['url'] = update_url_query(f
['url'], query
)
47 'title': info
.get('title'),
48 'description': info
.get('description'),
49 'uploader': info
.get('userName'),
51 'extra_param_to_segment_url': query_string
,