]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/ciscowebex.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
12 class CiscoWebexIE(InfoExtractor
):
13 IE_NAME
= 'ciscowebex'
14 IE_DESC
= 'Cisco Webex'
16 (?P<url>https?://(?P<subdomain>[^/#?]*)\.webex\.com/(?:
17 (?P<siteurl_1>[^/#?]*)/(?:ldr|lsr).php\?(?:[^#]*&)*RCID=(?P<rcid>[0-9a-f]{32})|
18 (?:recordingservice|webappng)/sites/(?P<siteurl_2>[^/#?]*)/recording/(?:playback/|play/)?(?P<id>[0-9a-f]{32})
22 'url': 'https://demosubdomain.webex.com/demositeurl/ldr.php?RCID=e58e803bc0f766bb5f6376d2e86adb5b',
23 'only_matching': True,
25 'url': 'http://demosubdomain.webex.com/demositeurl/lsr.php?RCID=bc04b4a7b5ea2cc3a493d5ae6aaff5d7',
26 'only_matching': True,
28 'url': 'https://demosubdomain.webex.com/recordingservice/sites/demositeurl/recording/88e7a42f7b19f5b423c54754aecc2ce9/playback',
29 'only_matching': True,
32 def _real_extract(self
, url
):
33 mobj
= self
._match
_valid
_url
(url
)
34 rcid
= mobj
.group('rcid')
36 webpage
= self
._download
_webpage
(url
, None, note
='Getting video ID')
37 url
= self
._search
_regex
(self
._VALID
_URL
, webpage
, 'redirection url', group
='url')
38 url
= self
._request
_webpage
(url
, None, note
='Resolving final URL').geturl()
39 mobj
= self
._match
_valid
_url
(url
)
40 subdomain
= mobj
.group('subdomain')
41 siteurl
= mobj
.group('siteurl_1') or mobj
.group('siteurl_2')
42 video_id
= mobj
.group('id')
44 stream
= self
._download
_json
(
45 'https://%s.webex.com/webappng/api/v1/recordings/%s/stream' % (subdomain
, video_id
),
46 video_id
, fatal
=False, query
={'siteurl': siteurl}
)
48 self
.raise_login_required(method
='cookies')
50 video_id
= stream
.get('recordUUID') or video_id
54 'url': stream
['fallbackPlaySrc'],
56 'vcodec': 'avc1.640028',
57 'acodec': 'mp4a.40.2',
59 if stream
.get('preventDownload') is False:
60 mp4url
= try_get(stream
, lambda x
: x
['downloadRecordingInfo']['downloadInfo']['mp4URL'])
66 'vcodec': 'avc1.640028',
67 'acodec': 'mp4a.40.2',
69 audiourl
= try_get(stream
, lambda x
: x
['downloadRecordingInfo']['downloadInfo']['audioURL'])
78 self
._sort
_formats
(formats
)
82 'title': stream
['recordName'],
83 'description': stream
.get('description'),
84 'uploader': stream
.get('ownerDisplayName'),
85 'uploader_id': stream
.get('ownerUserName') or stream
.get('ownerId'), # mail or id
86 'timestamp': unified_timestamp(stream
.get('createTime')),
87 'duration': int_or_none(stream
.get('duration'), 1000),
88 'webpage_url': 'https://%s.webex.com/recordingservice/sites/%s/recording/playback/%s' % (subdomain
, siteurl
, video_id
),