]> jfr.im git - yt-dlp.git/blame - yt_dlp/extractor/adobeconnect.py
[ie/matchtv] Fix extractor (#10190)
[yt-dlp.git] / yt_dlp / extractor / adobeconnect.py
CommitLineData
add96eb9 1import urllib.parse
2
f8987163 3from .common import InfoExtractor
f8987163
RA
4
5
6class AdobeConnectIE(InfoExtractor):
7 _VALID_URL = r'https?://\w+\.adobeconnect\.com/(?P<id>[\w-]+)'
8
9 def _real_extract(self, url):
10 video_id = self._match_id(url)
11 webpage = self._download_webpage(url, video_id)
04f3fd2c 12 title = self._html_extract_title(webpage)
add96eb9 13 qs = urllib.parse.parse_qs(self._search_regex(r"swfUrl\s*=\s*'([^']+)'", webpage, 'swf url').split('?')[1])
f8987163
RA
14 is_live = qs.get('isLive', ['false'])[0] == 'true'
15 formats = []
16 for con_string in qs['conStrings'][0].split(','):
17 formats.append({
18 'format_id': con_string.split('://')[0],
add96eb9 19 'app': urllib.parse.quote('?' + con_string.split('?')[1] + 'flvplayerapp/' + qs['appInstance'][0]),
f8987163
RA
20 'ext': 'flv',
21 'play_path': 'mp4:' + qs['streamName'][0],
22 'rtmp_conn': 'S:' + qs['ticket'][0],
23 'rtmp_live': is_live,
24 'url': con_string,
25 })
26
27 return {
28 'id': video_id,
39ca3b5c 29 'title': title,
f8987163
RA
30 'formats': formats,
31 'is_live': is_live,
32 }