logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

cellebrite.py (2366B)


  1. from .vidyard import VidyardBaseIE, VidyardIE
  2. from ..utils import ExtractorError, make_archive_id, url_basename
  3. class CellebriteIE(VidyardBaseIE):
  4. _VALID_URL = r'https?://cellebrite\.com/(?:\w+)?/(?P<id>[\w-]+)'
  5. _TESTS = [{
  6. 'url': 'https://cellebrite.com/en/collect-data-from-android-devices-with-cellebrite-ufed/',
  7. 'info_dict': {
  8. 'id': 'ZqmUss3dQfEMGpauambPuH',
  9. 'display_id': '16025876',
  10. 'ext': 'mp4',
  11. 'title': 'Ask the Expert: Chat Capture - Collect Data from Android Devices in Cellebrite UFED',
  12. 'description': 'md5:dee48fe12bbae5c01fe6a053f7676da4',
  13. 'thumbnail': 'https://cellebrite.com/wp-content/uploads/2021/05/Chat-Capture-1024x559.png',
  14. 'duration': 455.979,
  15. '_old_archive_ids': ['cellebrite 16025876'],
  16. },
  17. }, {
  18. 'url': 'https://cellebrite.com/en/how-to-lawfully-collect-the-maximum-amount-of-data-from-android-devices/',
  19. 'info_dict': {
  20. 'id': 'QV1U8a2yzcxigw7VFnqKyg',
  21. 'display_id': '29018255',
  22. 'ext': 'mp4',
  23. 'title': 'How to Lawfully Collect the Maximum Amount of Data From Android Devices',
  24. 'description': 'md5:0e943a9ac14c374d5d74faed634d773c',
  25. 'thumbnail': 'https://cellebrite.com/wp-content/uploads/2022/07/How-to-Lawfully-Collect-the-Maximum-Amount-of-Data-From-Android-Devices.png',
  26. 'duration': 134.315,
  27. '_old_archive_ids': ['cellebrite 29018255'],
  28. },
  29. }]
  30. def _real_extract(self, url):
  31. slug = self._match_id(url)
  32. webpage = self._download_webpage(url, slug)
  33. vidyard_url = next(VidyardIE._extract_embed_urls(url, webpage), None)
  34. if not vidyard_url:
  35. raise ExtractorError('No Vidyard video embeds found on page')
  36. video_id = url_basename(vidyard_url)
  37. info = self._process_video_json(self._fetch_video_json(video_id)['chapters'][0], video_id)
  38. if info.get('display_id'):
  39. info['_old_archive_ids'] = [make_archive_id(self, info['display_id'])]
  40. if thumbnail := self._og_search_thumbnail(webpage, default=None):
  41. info.setdefault('thumbnails', []).append({'url': thumbnail})
  42. return {
  43. 'description': self._og_search_description(webpage, default=None),
  44. **info,
  45. }