1 from .common
import InfoExtractor
2 from ..utils
import traverse_obj
5 class CellebriteIE(InfoExtractor
):
6 _VALID_URL
= r
'https?://cellebrite\.com/(?:\w+)?/(?P<id>[\w-]+)'
8 'url': 'https://cellebrite.com/en/collect-data-from-android-devices-with-cellebrite-ufed/',
12 'description': 'md5:174571cb97083fd1d457d75c684f4e2b',
13 'thumbnail': 'https://cellebrite.com/wp-content/uploads/2021/05/Chat-Capture-1024x559.png',
14 'title': 'Ask the Expert: Chat Capture - Collect Data from Android Devices in Cellebrite UFED',
19 'url': 'https://cellebrite.com/en/how-to-lawfully-collect-the-maximum-amount-of-data-from-android-devices/',
25 'description': 'md5:e9a3d124c7287b0b07bad2547061cacf',
26 'thumbnail': 'https://cellebrite.com/wp-content/uploads/2022/07/How-to-Lawfully-Collect-the-Maximum-Amount-of-Data-From-Android-Devices.png',
27 'title': 'Android Extractions Explained',
31 def _get_formats_and_subtitles(self
, json_data
, display_id
):
32 formats
= [{'url': url
} for url
in traverse_obj(json_data
, ('mp4', ..., 'url')) or []]
35 for url
in traverse_obj(json_data
, ('hls', ..., 'url')) or []:
36 fmt
, sub
= self
._extract
_m
3u8_formats
_and
_subtitles
(
37 url
, display_id
, ext
='mp4', headers
={'Referer': 'https://play.vidyard.com/'})
39 self
._merge
_subtitles
(sub
, target
=subtitles
)
41 return formats
, subtitles
43 def _real_extract(self
, url
):
44 display_id
= self
._match
_id
(url
)
45 webpage
= self
._download
_webpage
(url
, display_id
)
47 player_uuid
= self
._search
_regex
(
48 r
'<img\s[^>]*\bdata-uuid\s*=\s*"([^"\?]+)', webpage
, 'player UUID')
49 json_data
= self
._download
_json
(
50 f
'https://play.vidyard.com/player/{player_uuid}.json', display_id
)['payload']['chapters'][0]
52 formats
, subtitles
= self
._get
_formats
_and
_subtitles
(json_data
['sources'], display_id
)
54 'id': str(json_data
['videoId']),
55 'title': json_data
.get('name') or self
._og
_search
_title
(webpage
),
57 'subtitles': subtitles
,
58 'description': json_data
.get('description') or self
._og
_search
_description
(webpage
),
59 'duration': json_data
.get('seconds'),
60 'tags': json_data
.get('tags'),
61 'thumbnail': self
._og
_search
_thumbnail
(webpage
),
62 'http_headers': {'Referer': 'https://play.vidyard.com/'},