]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/downloader/__init__.py
1 from __future__
import unicode_literals
3 from .common
import FileDownloader
5 from .hls
import NativeHlsFD
6 from .http
import HttpFD
7 from .mplayer
import MplayerFD
8 from .rtmp
import RtmpFD
16 def get_suitable_downloader(info_dict
):
17 """Get the downloader class that can handle the info dict."""
18 url
= info_dict
['url']
19 protocol
= info_dict
.get('protocol')
21 if url
.startswith('rtmp'):
23 if protocol
== 'm3u8_native':
25 if (protocol
== 'm3u8') or (protocol
is None and determine_ext(url
) == 'm3u8'):
27 if url
.startswith('mms') or url
.startswith('rtsp'):
29 if determine_ext(url
) == 'f4m':
35 'get_suitable_downloader',