mirror of https://github.com/blackjack4494/yt-dlc
[brightcove] Extract m3u8 formats (#3541)
This commit is contained in:
parent
6110bbbfdd
commit
37aab27808
|
@ -14,6 +14,7 @@ from ..utils import (
|
||||||
compat_str,
|
compat_str,
|
||||||
compat_urllib_request,
|
compat_urllib_request,
|
||||||
compat_parse_qs,
|
compat_parse_qs,
|
||||||
|
compat_urllib_parse_urlparse,
|
||||||
|
|
||||||
determine_ext,
|
determine_ext,
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
|
@ -263,10 +264,16 @@ class BrightcoveIE(InfoExtractor):
|
||||||
if not url:
|
if not url:
|
||||||
continue
|
continue
|
||||||
if rend['remote']:
|
if rend['remote']:
|
||||||
# This type of renditions are served through akamaihd.net,
|
url_comp = compat_urllib_parse_urlparse(url)
|
||||||
# but they don't use f4m manifests
|
if url_comp.path.endswith('.m3u8'):
|
||||||
url = url.replace('control/', '') + '?&v=3.3.0&fp=13&r=FEEFJ&g=RTSJIMBMPFPB'
|
formats.extend(
|
||||||
ext = 'flv'
|
self._extract_m3u8_formats(url, info['id'], 'mp4'))
|
||||||
|
continue
|
||||||
|
elif 'akamaihd.net' in url_comp.netloc:
|
||||||
|
# This type of renditions are served through
|
||||||
|
# akamaihd.net, but they don't use f4m manifests
|
||||||
|
url = url.replace('control/', '') + '?&v=3.3.0&fp=13&r=FEEFJ&g=RTSJIMBMPFPB'
|
||||||
|
ext = 'flv'
|
||||||
else:
|
else:
|
||||||
ext = determine_ext(url)
|
ext = determine_ext(url)
|
||||||
size = rend.get('size')
|
size = rend.get('size')
|
||||||
|
|
|
@ -101,17 +101,19 @@ class GenericIE(InfoExtractor):
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
# https://github.com/rg3/youtube-dl/issues/3541
|
||||||
'add_ie': ['Brightcove'],
|
'add_ie': ['Brightcove'],
|
||||||
'url': 'http://www.kijk.nl/sbs6/leermijvrouwenkennen/videos/jqMiXKAYan2S/aflevering-1',
|
'url': 'http://www.kijk.nl/sbs6/leermijvrouwenkennen/videos/jqMiXKAYan2S/aflevering-1',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '3866516442001',
|
'id': '3866516442001',
|
||||||
'ext': 'flv',
|
'ext': 'mp4',
|
||||||
'title': 'Leer mij vrouwen kennen: Aflevering 1',
|
'title': 'Leer mij vrouwen kennen: Aflevering 1',
|
||||||
'description': 'Leer mij vrouwen kennen: Aflevering 1',
|
'description': 'Leer mij vrouwen kennen: Aflevering 1',
|
||||||
'uploader': 'SBS Broadcasting',
|
'uploader': 'SBS Broadcasting',
|
||||||
},
|
},
|
||||||
|
'skip': 'Restricted to Netherlands',
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True, # m3u8 download
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
# Direct link to a video
|
# Direct link to a video
|
||||||
|
|
Loading…
Reference in New Issue