aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/zoom.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-02-12 21:05:27 -0500
committerJesús <heckyel@hyperbola.info>2022-02-12 21:05:27 -0500
commitaf4847e22e81d05177f92c712983ab3f2f20184b (patch)
tree6b749333494ffe379df3e1a060660e4b1afcdf85 /yt_dlp/extractor/zoom.py
parentc4b763b19f54ed5dfc2fd408adb9ed74126f6740 (diff)
parent29448350808619262d6a9ddd393a2c28df1720fe (diff)
downloadhypervideo-pre-af4847e22e81d05177f92c712983ab3f2f20184b.tar.lz
hypervideo-pre-af4847e22e81d05177f92c712983ab3f2f20184b.tar.xz
hypervideo-pre-af4847e22e81d05177f92c712983ab3f2f20184b.zip
updated from upstream | 12/02/2022 at 21:05
Diffstat (limited to 'yt_dlp/extractor/zoom.py')
-rw-r--r--yt_dlp/extractor/zoom.py40
1 files changed, 33 insertions, 7 deletions
diff --git a/yt_dlp/extractor/zoom.py b/yt_dlp/extractor/zoom.py
index 25a0902f6..c00548839 100644
--- a/yt_dlp/extractor/zoom.py
+++ b/yt_dlp/extractor/zoom.py
@@ -6,6 +6,7 @@ from .common import InfoExtractor
from ..utils import (
ExtractorError,
int_or_none,
+ str_or_none,
js_to_json,
parse_filesize,
urlencode_postdata,
@@ -23,7 +24,8 @@ class ZoomIE(InfoExtractor):
'id': 'dUk_CNBETmZ5VA2BwEl-jjakPpJ3M1pcfVYAPRsoIbEByGsLjUZtaa4yCATQuOL3der8BlTwxQePl_j0.EImBkXzTIaPvdZO5',
'ext': 'mp4',
'title': 'China\'s "two sessions" and the new five-year plan',
- }
+ },
+ 'skip': 'Recording requires email authentication to access',
}
def _real_extract(self, url):
@@ -56,22 +58,46 @@ class ZoomIE(InfoExtractor):
webpage, 'data'), play_id, js_to_json)
subtitles = {}
- for _type in ('transcript', 'cc'):
+ for _type in ('transcript', 'cc', 'chapter'):
if data.get('%sUrl' % _type):
subtitles[_type] = [{
'url': urljoin(base_url, data['%sUrl' % _type]),
'ext': 'vtt',
}]
+ formats = []
+
+ if data.get('viewMp4Url'):
+ formats.append({
+ 'format_note': 'Camera stream',
+ 'url': str_or_none(data.get('viewMp4Url')),
+ 'width': int_or_none(data.get('viewResolvtionsWidth')),
+ 'height': int_or_none(data.get('viewResolvtionsHeight')),
+ 'format_id': str_or_none(data.get('recordingId')),
+ 'ext': 'mp4',
+ 'filesize_approx': parse_filesize(data.get('fileSize')),
+ 'preference': 0
+ })
+
+ if data.get('shareMp4Url'):
+ formats.append({
+ 'format_note': 'Screen share stream',
+ 'url': str_or_none(data.get('shareMp4Url')),
+ 'width': int_or_none(data.get('shareResolvtionsWidth')),
+ 'height': int_or_none(data.get('shareResolvtionsHeight')),
+ 'format_id': str_or_none(data.get('shareVideoId')),
+ 'ext': 'mp4',
+ 'preference': -1
+ })
+
+ self._sort_formats(formats)
+
return {
'id': play_id,
- 'title': data['topic'],
- 'url': data['viewMp4Url'],
+ 'title': data.get('topic'),
'subtitles': subtitles,
- 'width': int_or_none(data.get('viewResolvtionsWidth')),
- 'height': int_or_none(data.get('viewResolvtionsHeight')),
+ 'formats': formats,
'http_headers': {
'Referer': base_url,
},
- 'filesize_approx': parse_filesize(data.get('fileSize')),
}