hbmartin commited on
Commit
306ecb1
·
2 Parent(s): 2f4cd16 86b6955

Merge branch 'master' into resolution-selection

Browse files
Files changed (3) hide show
  1. README.md +3 -0
  2. pytube/cli.py +3 -2
  3. pytube/version.py +1 -1
README.md CHANGED
@@ -244,6 +244,9 @@ Finally, if you're filing a bug report, the cli contains a switch called ``--bui
244
 
245
  <a href="https://deepsource.io/gh/hbmartin/pytube3/?ref=repository-badge" target="_blank"><img alt="DeepSource" title="DeepSource" src="https://static.deepsource.io/deepsource-badge-light-mini.svg"></a>
246
  <a href="https://www.codacy.com/manual/hbmartin/pytube3?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=hbmartin/pytube3&amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/53794f06983a46829620b3284c6a5596"/></a>
 
 
 
247
 
248
  Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
249
 
 
244
 
245
  <a href="https://deepsource.io/gh/hbmartin/pytube3/?ref=repository-badge" target="_blank"><img alt="DeepSource" title="DeepSource" src="https://static.deepsource.io/deepsource-badge-light-mini.svg"></a>
246
  <a href="https://www.codacy.com/manual/hbmartin/pytube3?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=hbmartin/pytube3&amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/53794f06983a46829620b3284c6a5596"/></a>
247
+ <a href="https://codecov.io/gh/hbmartin/pytube3">
248
+ <img src="https://codecov.io/gh/hbmartin/pytube3/branch/master/graph/badge.svg" />
249
+ </a>
250
 
251
  Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
252
 
pytube/cli.py CHANGED
@@ -123,8 +123,9 @@ def build_playback_report(youtube: YouTube) -> None:
123
 
124
  def get_terminal_size() -> Tuple[int, int]:
125
  """Return the terminal size in rows and columns."""
126
- rows, columns = os.popen("stty size", "r").read().split()
127
- return int(rows), int(columns)
 
128
 
129
 
130
  def display_progress_bar(
 
123
 
124
  def get_terminal_size() -> Tuple[int, int]:
125
  """Return the terminal size in rows and columns."""
126
+ dims = os.get_terminal_size()
127
+ rows, columns = dims.lines, dims.columns
128
+ return rows, columns
129
 
130
 
131
  def display_progress_bar(
pytube/version.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "9.5.9"
2
 
3
  if __name__ == "__main__":
4
  print(__version__)
 
1
+ __version__ = "9.5.10"
2
 
3
  if __name__ == "__main__":
4
  print(__version__)