]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/downloader/__init__.py
1 from __future__
import unicode_literals
3 from .common
import FileDownloader
4 from .external
import get_external_downloader
7 from .hls
import NativeHlsFD
8 from .http
import HttpFD
9 from .rtsp
import RtspFD
10 from .rtmp
import RtmpFD
18 'm3u8_native': NativeHlsFD
,
26 def get_suitable_downloader(info_dict
, params
={}):
27 """Get the downloader class that can handle the info dict."""
28 protocol
= determine_protocol(info_dict
)
29 info_dict
['protocol'] = protocol
31 external_downloader
= params
.get('external_downloader')
32 if external_downloader
is not None:
33 ed
= get_external_downloader(external_downloader
)
34 if ed
.supports(info_dict
):
37 if protocol
== 'm3u8' and params
.get('hls_prefer_native'):
40 return PROTOCOL_MAP
.get(protocol
, HttpFD
)
44 'get_suitable_downloader',