aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Sebastian Karwacik <roman.karwacik@rwth-aachen.de>2020-04-12 23:27:58 +0200
committerinsaneracist <insaneracist@cyberdude.com>2020-11-02 16:09:16 -0800
commit3f0852e35fbe3fbd2f635daadb02425608db5cf2 (patch)
tree6e71e7fb7a1424b3e736757ca52dd43f2fb59f96
parent764876a01f2f9c1eb59691678c5629fe283a39ce (diff)
downloadhypervideo-pre-3f0852e35fbe3fbd2f635daadb02425608db5cf2.tar.lz
hypervideo-pre-3f0852e35fbe3fbd2f635daadb02425608db5cf2.tar.xz
hypervideo-pre-3f0852e35fbe3fbd2f635daadb02425608db5cf2.zip
[zoomus] Add new extractor
-rw-r--r--youtube_dlc/extractor/extractors.py1
-rw-r--r--youtube_dlc/extractor/zoomus.py51
2 files changed, 52 insertions, 0 deletions
diff --git a/youtube_dlc/extractor/extractors.py b/youtube_dlc/extractor/extractors.py
index 666134d86..34a8cecd5 100644
--- a/youtube_dlc/extractor/extractors.py
+++ b/youtube_dlc/extractor/extractors.py
@@ -1544,4 +1544,5 @@ from .zattoo import (
)
from .zdf import ZDFIE, ZDFChannelIE
from .zingmp3 import ZingMp3IE
+from .zoomus import ZoomUSIE
from .zype import ZypeIE
diff --git a/youtube_dlc/extractor/zoomus.py b/youtube_dlc/extractor/zoomus.py
new file mode 100644
index 000000000..150dbced7
--- /dev/null
+++ b/youtube_dlc/extractor/zoomus.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+from __future__ import unicode_literals
+
+from .common import InfoExtractor
+from ..utils import (
+ int_or_none,
+ parse_iso8601,
+ try_get,
+ url_or_none,
+)
+
+
+class ZoomUSIE(InfoExtractor):
+ IE_NAME = 'zoom.us'
+ _VALID_URL = r'https://zoom.us/recording/play/(?P<id>.*)'
+
+ _TESTS = [{
+ 'url': 'https://zoom.us/recording/play/SILVuCL4bFtRwWTtOCFQQxAsBQsJljFtm9e4Z_bvo-A8B-nzUSYZRNuPl3qW5IGK',
+ 'info_dict': {
+ 'ext': 'mp4',
+ 'topic': "GAZ Transformational Tuesdays W/ Landon & Stapes",
+ 'recordFileName': "Shared screen with speaker view",
+ }
+ }]
+
+ def _real_extract(self, url):
+ display_id = self._match_id(url)
+ webpage = self._download_webpage(url, display_id)
+ #cookie = self._get_cookies(url)['_zm_ssid']
+
+ 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),
+ '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/',
+ }
+ })
+ self._sort_formats(formats)
+
+ return {
+ 'id': display_id,
+ 'title': topic,
+ 'formats': formats
+ } \ No newline at end of file