mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-23 08:54:33 +01:00
IOL RTMP support
This commit is contained in:
parent
7eabb134fc
commit
c82b7ac8b0
@ -64,15 +64,27 @@ class IOLIE(InfoExtractor):
|
|||||||
formats_m3u8_default = self._extract_m3u8_formats(m3u8_url_default, video_id, ext='mp4')
|
formats_m3u8_default = self._extract_m3u8_formats(m3u8_url_default, video_id, ext='mp4')
|
||||||
formats.extend(formats_m3u8_default)
|
formats.extend(formats_m3u8_default)
|
||||||
|
|
||||||
server = 'video2.iol.pt'
|
# try rtmp format
|
||||||
formats.append({
|
if self._html_search_regex(r'<script\s+src\s*=\s*"([^"]*/cdn\.iol\.pt/js/iol\.js)"', webpage, "iol.js", fatal=False):
|
||||||
'url': 'rtmp://'+server+'/vod',
|
server = 'video1.iol.pt'
|
||||||
'play_path': 'mp4:' + multimedia_id + '-L-500k',
|
|
||||||
'format_id': 'rtmp-500',
|
try:
|
||||||
'tbr': 500,
|
# get actual server
|
||||||
'protocol': 'rtmp',
|
xml = self._download_xml('http://www.iol.pt/videolb', video_id, note='Downloading server info XML', fatal=False)
|
||||||
'ext': 'mp4'
|
if 'redirect' == xml.tag:
|
||||||
})
|
server = xml.text
|
||||||
|
|
||||||
|
except Exception as ex:
|
||||||
|
# just ignore every error, rtmp is not essential
|
||||||
|
self.report_warning('RTMP server not found. %r' % (ex,))
|
||||||
|
|
||||||
|
formats.append({
|
||||||
|
'url': 'rtmp://' + server + '/vod',
|
||||||
|
'play_path': 'mp4:' + multimedia_id + '-L-500k',
|
||||||
|
'format_id': 'rtmp-500',
|
||||||
|
'tbr': 500,
|
||||||
|
'protocol': 'rtmp'
|
||||||
|
})
|
||||||
|
|
||||||
formats.append({
|
formats.append({
|
||||||
'url': 'http://www.iol.pt/videos-file/' + multimedia_id + '-L-500k.mp4',
|
'url': 'http://www.iol.pt/videos-file/' + multimedia_id + '-L-500k.mp4',
|
||||||
|
Loading…
Reference in New Issue
Block a user