diff options
author | Jouke Waleson <jouke.waleson@mendix.com> | 2014-11-23 21:20:46 +0100 |
---|---|---|
committer | Jouke Waleson <jouke.waleson@mendix.com> | 2014-11-23 21:20:46 +0100 |
commit | 8bcc875676b56c062a4fdd81763a6adb0fb1390c (patch) | |
tree | 429ecb8bb9ee320a0dd72e064ec251f588d479bf /youtube_dl/downloader | |
parent | 5f6a1245ffa9276c1af59b0835afeef67e2fb5b1 (diff) |
PEP8: more applied
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r-- | youtube_dl/downloader/f4m.py | 4 | ||||
-rw-r--r-- | youtube_dl/downloader/rtmp.py | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/youtube_dl/downloader/f4m.py b/youtube_dl/downloader/f4m.py index b607f6485..ed8df16d2 100644 --- a/youtube_dl/downloader/f4m.py +++ b/youtube_dl/downloader/f4m.py @@ -55,7 +55,7 @@ class FlvReader(io.BytesIO): if size == 1: real_size = self.read_unsigned_long_long() header_end = 16 - return real_size, box_type, self.read(real_size-header_end) + return real_size, box_type, self.read(real_size -header_end) def read_asrt(self): # version @@ -180,7 +180,7 @@ def build_fragments_list(boot_info): n_frags = segment_run_entry[1] fragment_run_entry_table = boot_info['fragments'][0]['fragments'] first_frag_number = fragment_run_entry_table[0]['first'] - for (i, frag_number) in zip(range(1, n_frags+1), itertools.count(first_frag_number)): + for (i, frag_number) in zip(range(1, n_frags +1), itertools.count(first_frag_number)): res.append((1, frag_number)) return res diff --git a/youtube_dl/downloader/rtmp.py b/youtube_dl/downloader/rtmp.py index b8e104c59..642f13b9a 100644 --- a/youtube_dl/downloader/rtmp.py +++ b/youtube_dl/downloader/rtmp.py @@ -46,13 +46,13 @@ class RtmpFD(FileDownloader): continue mobj = re.search(r'([0-9]+\.[0-9]{3}) kB / [0-9]+\.[0-9]{2} sec \(([0-9]{1,2}\.[0-9])%\)', line) if mobj: - downloaded_data_len = int(float(mobj.group(1))*1024) + downloaded_data_len = int(float(mobj.group(1)) *1024) percent = float(mobj.group(2)) if not resume_percent: resume_percent = percent resume_downloaded_data_len = downloaded_data_len - eta = self.calc_eta(start, time.time(), 100-resume_percent, percent-resume_percent) - speed = self.calc_speed(start, time.time(), downloaded_data_len-resume_downloaded_data_len) + eta = self.calc_eta(start, time.time(), 100 -resume_percent, percent -resume_percent) + speed = self.calc_speed(start, time.time(), downloaded_data_len -resume_downloaded_data_len) data_len = None if percent > 0: data_len = int(downloaded_data_len * 100 / percent) @@ -72,7 +72,7 @@ class RtmpFD(FileDownloader): # no percent for live streams mobj = re.search(r'([0-9]+\.[0-9]{3}) kB / [0-9]+\.[0-9]{2} sec', line) if mobj: - downloaded_data_len = int(float(mobj.group(1))*1024) + downloaded_data_len = int(float(mobj.group(1)) *1024) time_now = time.time() speed = self.calc_speed(start, time_now, downloaded_data_len) self.report_progress_live_stream(downloaded_data_len, speed, time_now - start) @@ -88,7 +88,7 @@ class RtmpFD(FileDownloader): if not cursor_in_new_line: self.to_screen('') cursor_in_new_line = True - self.to_screen('[rtmpdump] '+line) + self.to_screen('[rtmpdump] ' +line) proc.wait() if not cursor_in_new_line: self.to_screen('') |