1 from .common
import InfoExtractor
10 class CiscoWebexIE(InfoExtractor
):
11 IE_NAME
= 'ciscowebex'
12 IE_DESC
= 'Cisco Webex'
14 (?P<url>https?://(?P<subdomain>[^/#?]*)\.webex\.com/(?:
15 (?P<siteurl_1>[^/#?]*)/(?:ldr|lsr).php\?(?:[^#]*&)*RCID=(?P<rcid>[0-9a-f]{32})|
16 (?:recordingservice|webappng)/sites/(?P<siteurl_2>[^/#?]*)/recording/(?:playback/|play/)?(?P<id>[0-9a-f]{32})
20 'url': 'https://demosubdomain.webex.com/demositeurl/ldr.php?RCID=e58e803bc0f766bb5f6376d2e86adb5b',
21 'only_matching': True,
23 'url': 'http://demosubdomain.webex.com/demositeurl/lsr.php?RCID=bc04b4a7b5ea2cc3a493d5ae6aaff5d7',
24 'only_matching': True,
26 'url': 'https://demosubdomain.webex.com/recordingservice/sites/demositeurl/recording/88e7a42f7b19f5b423c54754aecc2ce9/playback',
27 'only_matching': True,
30 def _real_extract(self
, url
):
31 mobj
= self
._match
_valid
_url
(url
)
32 rcid
= mobj
.group('rcid')
34 webpage
= self
._download
_webpage
(url
, None, note
='Getting video ID')
35 url
= self
._search
_regex
(self
._VALID
_URL
, webpage
, 'redirection url', group
='url')
36 url
= self
._request
_webpage
(url
, None, note
='Resolving final URL').url
37 mobj
= self
._match
_valid
_url
(url
)
38 subdomain
= mobj
.group('subdomain')
39 siteurl
= mobj
.group('siteurl_1') or mobj
.group('siteurl_2')
40 video_id
= mobj
.group('id')
42 password
= self
.get_param('videopassword')
44 headers
= {'Accept': 'application/json'}
46 headers
['accessPwd'] = password
48 stream
, urlh
= self
._download
_json
_handle
(
49 f
'https://{subdomain}.webex.com/webappng/api/v1/recordings/{video_id}/stream',
50 video_id
, headers
=headers
, query
={'siteurl': siteurl
}, expected_status
=(403, 429))
52 if urlh
.status
== 403:
53 if stream
['code'] == 53004:
54 self
.raise_login_required()
55 if stream
['code'] == 53005:
57 raise ExtractorError('Wrong password', expected
=True)
59 'This video is protected by a password, use the --video-password option', expected
=True)
60 raise ExtractorError(f
'{self.IE_NAME} said: {stream["code"]} - {stream["message"]}', expected
=True)
62 if urlh
.status
== 429:
63 self
.raise_login_required(
64 f
'{self.IE_NAME} asks you to solve a CAPTCHA. Solve CAPTCHA in browser and',
67 video_id
= stream
.get('recordUUID') or video_id
71 'url': stream
['fallbackPlaySrc'],
73 'vcodec': 'avc1.640028',
74 'acodec': 'mp4a.40.2',
76 if stream
.get('preventDownload') is False:
77 mp4url
= try_get(stream
, lambda x
: x
['downloadRecordingInfo']['downloadInfo']['mp4URL'])
83 'vcodec': 'avc1.640028',
84 'acodec': 'mp4a.40.2',
86 audiourl
= try_get(stream
, lambda x
: x
['downloadRecordingInfo']['downloadInfo']['audioURL'])
98 'title': stream
['recordName'],
99 'description': stream
.get('description'),
100 'uploader': stream
.get('ownerDisplayName'),
101 'uploader_id': stream
.get('ownerUserName') or stream
.get('ownerId'),
102 'timestamp': unified_timestamp(stream
.get('createTime')),
103 'duration': int_or_none(stream
.get('duration'), 1000),
104 'webpage_url': f
'https://{subdomain}.webex.com/recordingservice/sites/{siteurl}/recording/playback/{video_id}',