mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-12 20:23:11 +00:00
Some pep8 style fixes
This commit is contained in:
parent
944d65c762
commit
f89197d73e
@ -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
|
||||
|
||||
|
@ -314,4 +314,3 @@ class FileDownloader(object):
|
||||
if the download is successful.
|
||||
"""
|
||||
self._progress_hooks.append(ph)
|
||||
|
||||
|
@ -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
|
||||
|
@ -18,7 +18,7 @@ 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.
|
||||
|
Loading…
Reference in New Issue
Block a user