Richard Borcsik commited on
Commit
48f367d
·
1 Parent(s): 47bd4f1

Correct indentation

Browse files
Files changed (2) hide show
  1. pytube/models.py +7 -1
  2. pytube/utils.py +4 -4
pytube/models.py CHANGED
@@ -30,7 +30,13 @@ class Video(object):
30
  Keyword arguments:
31
  path -- Destination directory
32
  chunk_size -- File size (in bytes) to write to buffer at a time
33
- (default: 8 bytes).
 
 
 
 
 
 
34
  """
35
 
36
  path = (normpath(path) + '/' if path else '')
 
30
  Keyword arguments:
31
  path -- Destination directory
32
  chunk_size -- File size (in bytes) to write to buffer at a time
33
+ (default: 8 bytes).
34
+ on_progress -- A function to be called every time the buffer was
35
+ written out. Arguments passed are the current and
36
+ the full size.
37
+ on_finish -- To be called when the download is finished. The full
38
+ path to the file is passed as an argument.
39
+
40
  """
41
 
42
  path = (normpath(path) + '/' if path else '')
pytube/utils.py CHANGED
@@ -28,7 +28,7 @@ def safe_filename(text, max_length=200):
28
 
29
 
30
  def print_status(progress, file_size):
31
- percent = progress * 100. / file_size
32
- status = r"%10d [%3.2f%%]" % (progress, percent)
33
- status = status + chr(8) * (len(status) + 1)
34
- print status,
 
28
 
29
 
30
  def print_status(progress, file_size):
31
+ percent = progress * 100. / file_size
32
+ status = r"%10d [%3.2f%%]" % (progress, percent)
33
+ status = status + chr(8) * (len(status) + 1)
34
+ print status,