aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r--youtube_dl/downloader/__init__.py2
-rw-r--r--youtube_dl/downloader/common.py1
-rw-r--r--youtube_dl/downloader/http.py6
-rw-r--r--youtube_dl/downloader/mplayer.py4
4 files changed, 6 insertions, 7 deletions
diff --git a/youtube_dl/downloader/__init__.py b/youtube_dl/downloader/__init__.py
index f19b490f1..0d9eb0001 100644
--- a/youtube_dl/downloader/__init__.py
+++ b/youtube_dl/downloader/__init__.py
@@ -8,6 +8,7 @@ from ..utils import (
determine_ext,
)
+
def get_suitable_downloader(info_dict):
"""Get the downloader class that can handle the info dict."""
url = info_dict['url']
@@ -20,4 +21,3 @@ def get_suitable_downloader(info_dict):
return MplayerFD
else:
return HttpFD
-
diff --git a/youtube_dl/downloader/common.py b/youtube_dl/downloader/common.py
index 10143d56a..5a068aa8b 100644
--- a/youtube_dl/downloader/common.py
+++ b/youtube_dl/downloader/common.py
@@ -314,4 +314,3 @@ class FileDownloader(object):
if the download is successful.
"""
self._progress_hooks.append(ph)
-
diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py
index 8407727ba..748f9f3ad 100644
--- a/youtube_dl/downloader/http.py
+++ b/youtube_dl/downloader/http.py
@@ -27,7 +27,7 @@ class HttpFD(FileDownloader):
request = compat_urllib_request.Request(url, None, headers)
if self.params.get('test', False):
- request.add_header('Range','bytes=0-10240')
+ request.add_header('Range', 'bytes=0-10240')
# Establish possible resume length
if os.path.isfile(encodeFilename(tmpfilename)):
@@ -39,7 +39,7 @@ class HttpFD(FileDownloader):
if resume_len != 0:
if self.params.get('continuedl', False):
self.report_resuming_byte(resume_len)
- request.add_header('Range','bytes=%d-' % resume_len)
+ request.add_header('Range', 'bytes=%d-' % resume_len)
open_mode = 'ab'
else:
resume_len = 0
@@ -100,7 +100,7 @@ class HttpFD(FileDownloader):
if data_len is not None:
data_len = int(data_len) + resume_len
min_data_len = self.params.get("min_filesize", None)
- max_data_len = self.params.get("max_filesize", None)
+ max_data_len = self.params.get("max_filesize", None)
if min_data_len is not None and data_len < min_data_len:
self.to_screen(u'\r[download] File is smaller than min-filesize (%s bytes < %s bytes). Aborting.' % (data_len, min_data_len))
return False
diff --git a/youtube_dl/downloader/mplayer.py b/youtube_dl/downloader/mplayer.py
index 67e0e4189..4de7f15f4 100644
--- a/youtube_dl/downloader/mplayer.py
+++ b/youtube_dl/downloader/mplayer.py
@@ -18,10 +18,10 @@ class MplayerFD(FileDownloader):
try:
subprocess.call(['mplayer', '-h'], stdout=(open(os.path.devnull, 'w')), stderr=subprocess.STDOUT)
except (OSError, IOError):
- self.report_error(u'MMS or RTSP download detected but "%s" could not be run' % args[0] )
+ self.report_error(u'MMS or RTSP download detected but "%s" could not be run' % args[0])
return False
- # Download using mplayer.
+ # Download using mplayer.
retval = subprocess.call(args)
if retval == 0:
fsize = os.path.getsize(encodeFilename(tmpfilename))