2024-06-11 17:09:58 -06:00
|
|
|
import urllib.parse
|
|
|
|
|
2019-04-02 15:40:39 -06:00
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
|
|
|
|
class AdobeConnectIE(InfoExtractor):
|
|
|
|
_VALID_URL = r'https?://\w+\.adobeconnect\.com/(?P<id>[\w-]+)'
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
video_id = self._match_id(url)
|
|
|
|
webpage = self._download_webpage(url, video_id)
|
2022-04-04 02:27:35 -06:00
|
|
|
title = self._html_extract_title(webpage)
|
2024-06-11 17:09:58 -06:00
|
|
|
qs = urllib.parse.parse_qs(self._search_regex(r"swfUrl\s*=\s*'([^']+)'", webpage, 'swf url').split('?')[1])
|
2019-04-02 15:40:39 -06:00
|
|
|
is_live = qs.get('isLive', ['false'])[0] == 'true'
|
|
|
|
formats = []
|
|
|
|
for con_string in qs['conStrings'][0].split(','):
|
|
|
|
formats.append({
|
|
|
|
'format_id': con_string.split('://')[0],
|
2024-06-11 17:09:58 -06:00
|
|
|
'app': urllib.parse.quote('?' + con_string.split('?')[1] + 'flvplayerapp/' + qs['appInstance'][0]),
|
2019-04-02 15:40:39 -06:00
|
|
|
'ext': 'flv',
|
|
|
|
'play_path': 'mp4:' + qs['streamName'][0],
|
|
|
|
'rtmp_conn': 'S:' + qs['ticket'][0],
|
|
|
|
'rtmp_live': is_live,
|
|
|
|
'url': con_string,
|
|
|
|
})
|
|
|
|
|
|
|
|
return {
|
|
|
|
'id': video_id,
|
2021-12-15 09:00:46 -07:00
|
|
|
'title': title,
|
2019-04-02 15:40:39 -06:00
|
|
|
'formats': formats,
|
|
|
|
'is_live': is_live,
|
|
|
|
}
|