Some pep8 style fixes
[youtube-dl] / youtube_dl / downloader / __init__.py
1 from .common import FileDownloader
2 from .hls import HlsFD
3 from .http import HttpFD
4 from .mplayer import MplayerFD
5 from .rtmp import RtmpFD
6
7 from ..utils import (
8     determine_ext,
9 )
10
11
12 def get_suitable_downloader(info_dict):
13     """Get the downloader class that can handle the info dict."""
14     url = info_dict['url']
15
16     if url.startswith('rtmp'):
17         return RtmpFD
18     if determine_ext(url) == u'm3u8':
19         return HlsFD
20     if url.startswith('mms') or url.startswith('rtsp'):
21         return MplayerFD
22     else:
23         return HttpFD