Skip to content

Commit

Permalink
[Zoom] Fix extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
rafiw committed Jun 30, 2024
1 parent 4d05f84 commit 910a890
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions youtube_dl/extractor/zoom.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,22 @@ def _real_extract(self, url):
data = self._parse_json(self._search_regex(
r'(?s)window\.__data__\s*=\s*({.+?});',
webpage, 'data'), play_id, js_to_json)

try:
video_page = self._parse_json(self._download_webpage(
base_url + "nws/recording/1.0/play/info/" + data["fileId"], play_id),
play_id, js_to_json)
except Exception:
video_page = self._parse_json(self._download_webpage(
base_url + "nws/recording/1.0/play/share-info/" + data["fileId"], play_id),
play_id, js_to_json)
return {
'id': play_id,
'title': data['topic'],
'url': data['viewMp4Url'],
'width': int_or_none(data.get('viewResolvtionsWidth')),
'height': int_or_none(data.get('viewResolvtionsHeight')),
'title': video_page["result"]["meet"]["topic"],
'url': video_page["result"]['viewMp4Url'],
'width': int_or_none(video_page["result"]["viewResolvtions"][0]),
'height': int_or_none(video_page["result"]["viewResolvtions"][1]),
'http_headers': {
'Referer': base_url,
},
'filesize_approx': parse_filesize(data.get('fileSize')),
'filesize_approx': parse_filesize(video_page["result"]["recording"]["fileSizeInMB"]),
}

0 comments on commit 910a890

Please sign in to comment.