Taylor Fox Dahlin commited on
Commit
8b96181
·
unverified ·
1 Parent(s): 4c073d1

Documentation update. (#979)

Browse files

* Adds some documentation about downloading a stream to the streams section of readthedocs.

* Hopefully fixes some API documentation references

Files changed (1) hide show
  1. docs/user/streams.rst +15 -1
docs/user/streams.rst CHANGED
@@ -42,7 +42,7 @@ Pytube has built-in functionality to filter the streams available in a YouTube
42
  object with the .filter() method. You can pass it a number of different keyword
43
  arguments, so let's review some of the different options you're most likely to
44
  use. For a complete list of available properties to filter on, you can view the
45
- API documentation here: :py:meth:`pytube.StreamQuery.filter`.
46
 
47
  Filtering by streaming method
48
  -----------------------------
@@ -93,3 +93,17 @@ To query only streams in the MP4 format::
93
  ...
94
  <Stream: itag="394" mime_type="video/mp4" res="None" fps="30fps" vcodec="av01.0.00M.08" progressive="False" type="video">,
95
  <Stream: itag="140" mime_type="audio/mp4" abr="128kbps" acodec="mp4a.40.2" progressive="False" type="audio">]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  object with the .filter() method. You can pass it a number of different keyword
43
  arguments, so let's review some of the different options you're most likely to
44
  use. For a complete list of available properties to filter on, you can view the
45
+ API documentation here: :meth:`pytube.StreamQuery.filter`.
46
 
47
  Filtering by streaming method
48
  -----------------------------
 
93
  ...
94
  <Stream: itag="394" mime_type="video/mp4" res="None" fps="30fps" vcodec="av01.0.00M.08" progressive="False" type="video">,
95
  <Stream: itag="140" mime_type="audio/mp4" abr="128kbps" acodec="mp4a.40.2" progressive="False" type="audio">]
96
+
97
+ Downloading Streams
98
+ ===================
99
+
100
+ After you've selected the :class:`Stream <pytube.Stream>` you're interested,
101
+ you're ready to interact with it. At this point, you can query information
102
+ about the stream, such as its filesize, whether the stream is adaptive, and
103
+ more. You can also use the download method to save the file::
104
+
105
+ >>> stream = yt.streams.get_by_itag(22)
106
+ >>> stream.download()
107
+
108
+ The download method has a number of different useful arguments, which are
109
+ documented in the API reference here: :meth:`pytube.Stream.download`.