2020-04-12 21:27:58 +00:00
|
|
|
# coding: utf-8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from .common import InfoExtractor
|
|
|
|
from ..utils import (
|
|
|
|
int_or_none,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
class ZoomUSIE(InfoExtractor):
|
|
|
|
IE_NAME = 'zoom.us'
|
2020-04-12 21:40:00 +00:00
|
|
|
_VALID_URL = r'https://(.*).?zoom.us/rec(ording)?/play/(?P<id>.*)'
|
2020-04-12 21:27:58 +00:00
|
|
|
|
2020-04-12 22:18:40 +00:00
|
|
|
_TEST = {
|
2020-04-12 21:27:58 +00:00
|
|
|
'url': 'https://zoom.us/recording/play/SILVuCL4bFtRwWTtOCFQQxAsBQsJljFtm9e4Z_bvo-A8B-nzUSYZRNuPl3qW5IGK',
|
|
|
|
'info_dict': {
|
2020-04-12 22:18:40 +00:00
|
|
|
'md5': '031a5b379f1547a8b29c5c4c837dccf2',
|
|
|
|
'title': "GAZ Transformational Tuesdays W/ Landon & Stapes",
|
|
|
|
'id': "SILVuCL4bFtRwWTtOCFQQxAsBQsJljFtm9e4Z_bvo-A8B-nzUSYZRNuPl3qW5IGK",
|
|
|
|
'ext': "mp4",
|
2020-04-12 21:27:58 +00:00
|
|
|
}
|
2020-04-12 22:18:40 +00:00
|
|
|
}
|
2020-04-12 21:27:58 +00:00
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
display_id = self._match_id(url)
|
|
|
|
webpage = self._download_webpage(url, display_id)
|
|
|
|
|
|
|
|
video_url = self._search_regex(r"viewMp4Url: \'(.*)\'", webpage, 'video url')
|
|
|
|
topic = self._search_regex(r"topic: \"(.*)\",", webpage, 'video url')
|
|
|
|
viewResolvtionsWidth = self._search_regex(r"viewResolvtionsWidth: (.*),", webpage, 'res width')
|
|
|
|
viewResolvtionsHeight = self._search_regex(r"viewResolvtionsHeight: (.*),", webpage, 'res width')
|
|
|
|
|
|
|
|
formats = []
|
|
|
|
formats.append({
|
|
|
|
'url': video_url,
|
|
|
|
'width': int_or_none(viewResolvtionsWidth),
|
|
|
|
'height': int_or_none(viewResolvtionsHeight),
|
2020-04-12 22:18:40 +00:00
|
|
|
'http_headers': {'Accept': 'video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5',
|
|
|
|
'Referer': 'https://zoom.us/'}
|
2020-04-12 21:27:58 +00:00
|
|
|
})
|
|
|
|
self._sort_formats(formats)
|
|
|
|
|
|
|
|
return {
|
|
|
|
'id': display_id,
|
|
|
|
'title': topic,
|
|
|
|
'formats': formats
|
2020-04-12 22:18:40 +00:00
|
|
|
}
|