diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-03-01 05:39:50 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-03-01 05:39:50 +0530 |
commit | 5ef7d9bdd8c4d480612d88bd0bd2a4196f2e2562 (patch) | |
tree | 072507bc71bd61a30fe6b71adcc920d26e33b9a0 /yt_dlp/downloader | |
parent | 62bff2c170a8f12d937d62a2ca74586c5e0eff1f (diff) | |
download | hypervideo-pre-5ef7d9bdd8c4d480612d88bd0bd2a4196f2e2562.tar.lz hypervideo-pre-5ef7d9bdd8c4d480612d88bd0bd2a4196f2e2562.tar.xz hypervideo-pre-5ef7d9bdd8c4d480612d88bd0bd2a4196f2e2562.zip |
Release 2021.03.01
Diffstat (limited to 'yt_dlp/downloader')
-rw-r--r-- | yt_dlp/downloader/common.py | 6 | ||||
-rw-r--r-- | yt_dlp/downloader/fragment.py | 6 | ||||
-rw-r--r-- | yt_dlp/downloader/niconico.py | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/yt_dlp/downloader/common.py b/yt_dlp/downloader/common.py index 7f7296915..2a9a62df4 100644 --- a/yt_dlp/downloader/common.py +++ b/yt_dlp/downloader/common.py @@ -312,7 +312,7 @@ class FileDownloader(object): def report_retry(self, err, count, retries): """Report retry in case of HTTP error 5xx""" self.to_screen( - '[download] Got server HTTP error: %s. Retrying (attempt %d of %s)...' + '[download] Got server HTTP error: %s. Retrying (attempt %d of %s) ...' % (error_to_compat_str(err), count, self.format_retries(retries))) def report_file_already_downloaded(self, file_name): @@ -359,7 +359,7 @@ class FileDownloader(object): max_sleep_interval = self.params.get('max_sleep_interval', min_sleep_interval) sleep_interval = random.uniform(min_sleep_interval, max_sleep_interval) self.to_screen( - '[download] Sleeping %s seconds...' % ( + '[download] Sleeping %s seconds ...' % ( int(sleep_interval) if sleep_interval.is_integer() else '%.2f' % sleep_interval)) time.sleep(sleep_interval) @@ -369,7 +369,7 @@ class FileDownloader(object): sleep_interval_sub = self.params.get('sleep_interval_subtitles') if sleep_interval_sub > 0: self.to_screen( - '[download] Sleeping %s seconds...' % ( + '[download] Sleeping %s seconds ...' % ( sleep_interval_sub)) time.sleep(sleep_interval_sub) return self.real_download(filename, info_dict), True diff --git a/yt_dlp/downloader/fragment.py b/yt_dlp/downloader/fragment.py index 44beed066..a0c1d13ac 100644 --- a/yt_dlp/downloader/fragment.py +++ b/yt_dlp/downloader/fragment.py @@ -55,11 +55,11 @@ class FragmentFD(FileDownloader): def report_retry_fragment(self, err, frag_index, count, retries): self.to_screen( - '[download] Got server HTTP error: %s. Retrying fragment %d (attempt %d of %s)...' + '[download] Got server HTTP error: %s. Retrying fragment %d (attempt %d of %s) ...' % (error_to_compat_str(err), frag_index, count, self.format_retries(retries))) def report_skip_fragment(self, frag_index): - self.to_screen('[download] Skipping fragment %d...' % frag_index) + self.to_screen('[download] Skipping fragment %d ...' % frag_index) def _prepare_url(self, info_dict, url): headers = info_dict.get('http_headers') @@ -174,7 +174,7 @@ class FragmentFD(FileDownloader): '.ytdl file is corrupt' if is_corrupt else 'Inconsistent state of incomplete fragment download') self.report_warning( - '%s. Restarting from the beginning...' % message) + '%s. Restarting from the beginning ...' % message) ctx['fragment_index'] = resume_len = 0 if 'ytdl_corrupt' in ctx: del ctx['ytdl_corrupt'] diff --git a/yt_dlp/downloader/niconico.py b/yt_dlp/downloader/niconico.py index 38476783f..dc49dff58 100644 --- a/yt_dlp/downloader/niconico.py +++ b/yt_dlp/downloader/niconico.py @@ -29,7 +29,7 @@ class NiconicoDmcFD(FileDownloader): heartbeat_url = heartbeat_info_dict['url'] heartbeat_data = heartbeat_info_dict['data'] heartbeat_interval = heartbeat_info_dict.get('interval', 30) - self.to_screen('[%s] Heartbeat with %s second interval...' % (self.FD_NAME, heartbeat_interval)) + self.to_screen('[%s] Heartbeat with %s second interval ...' % (self.FD_NAME, heartbeat_interval)) def heartbeat(): try: |