mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-01-26 00:32:35 +00:00
[ie/zoom] Extract recordings with start times (#15475)
Authored by: JV-Fernandes
This commit is contained in:
committed by
GitHub
parent
5026548d65
commit
0066de5b7e
@@ -4,13 +4,15 @@ from ..utils import (
|
|||||||
int_or_none,
|
int_or_none,
|
||||||
js_to_json,
|
js_to_json,
|
||||||
parse_filesize,
|
parse_filesize,
|
||||||
|
parse_qs,
|
||||||
parse_resolution,
|
parse_resolution,
|
||||||
str_or_none,
|
str_or_none,
|
||||||
traverse_obj,
|
update_url_query,
|
||||||
url_basename,
|
url_basename,
|
||||||
urlencode_postdata,
|
urlencode_postdata,
|
||||||
urljoin,
|
urljoin,
|
||||||
)
|
)
|
||||||
|
from ..utils.traversal import traverse_obj
|
||||||
|
|
||||||
|
|
||||||
class ZoomIE(InfoExtractor):
|
class ZoomIE(InfoExtractor):
|
||||||
@@ -87,6 +89,7 @@ class ZoomIE(InfoExtractor):
|
|||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
base_url, url_type, video_id = self._match_valid_url(url).group('base_url', 'type', 'id')
|
base_url, url_type, video_id = self._match_valid_url(url).group('base_url', 'type', 'id')
|
||||||
query = {}
|
query = {}
|
||||||
|
start_params = traverse_obj(url, {'startTime': ({parse_qs}, 'startTime', -1)})
|
||||||
|
|
||||||
if url_type == 'share':
|
if url_type == 'share':
|
||||||
webpage = self._get_real_webpage(url, base_url, video_id, 'share')
|
webpage = self._get_real_webpage(url, base_url, video_id, 'share')
|
||||||
@@ -94,7 +97,7 @@ class ZoomIE(InfoExtractor):
|
|||||||
redirect_path = self._download_json(
|
redirect_path = self._download_json(
|
||||||
f'{base_url}nws/recording/1.0/play/share-info/{meeting_id}',
|
f'{base_url}nws/recording/1.0/play/share-info/{meeting_id}',
|
||||||
video_id, note='Downloading share info JSON')['result']['redirectUrl']
|
video_id, note='Downloading share info JSON')['result']['redirectUrl']
|
||||||
url = urljoin(base_url, redirect_path)
|
url = update_url_query(urljoin(base_url, redirect_path), start_params)
|
||||||
query['continueMode'] = 'true'
|
query['continueMode'] = 'true'
|
||||||
|
|
||||||
webpage = self._get_real_webpage(url, base_url, video_id, 'play')
|
webpage = self._get_real_webpage(url, base_url, video_id, 'play')
|
||||||
@@ -103,6 +106,7 @@ class ZoomIE(InfoExtractor):
|
|||||||
# When things go wrong, file_id can be empty string
|
# When things go wrong, file_id can be empty string
|
||||||
raise ExtractorError('Unable to extract file ID')
|
raise ExtractorError('Unable to extract file ID')
|
||||||
|
|
||||||
|
query.update(start_params)
|
||||||
data = self._download_json(
|
data = self._download_json(
|
||||||
f'{base_url}nws/recording/1.0/play/info/{file_id}', video_id, query=query,
|
f'{base_url}nws/recording/1.0/play/info/{file_id}', video_id, query=query,
|
||||||
note='Downloading play info JSON')['result']
|
note='Downloading play info JSON')['result']
|
||||||
|
|||||||
Reference in New Issue
Block a user