nficano commited on
Commit
623602b
·
1 Parent(s): deff056

updated readme

Browse files
Files changed (1) hide show
  1. README.rst +32 -32
README.rst CHANGED
@@ -48,19 +48,19 @@ Library usage
48
 
49
  .. code:: python
50
 
51
- >>> from pytube import YouTube
52
 
53
- >>> yt = YouTube("http://www.youtube.com/watch?v=9bZkp7q19f0")
54
 
55
- >>> # Once set, you can see all the codec and quality options YouTube has made
56
- >>> # available for the particular video by printing videos.
57
 
58
- >>> yt.streams.all()
59
- [<Stream: itag="22" mime_type="video/mp4" res="720p" fps="30fps" vcodec="avc1.64001F" acodec="mp4a.40.2">,
60
- <Stream: itag="43" mime_type="video/webm" res="360p" fps="30fps" vcodec="vp8.0" acodec="vorbis">,
61
- <Stream: itag="18" mime_type="video/mp4" res="360p" fps="30fps" vcodec="avc1.42001E" acodec="mp4a.40.2">,
62
- <Stream: itag="36" mime_type="video/3gpp" res="240p" fps="30fps" vcodec="mp4v.20.3" acodec="mp4a.40.2">,
63
- <Stream: itag="17" mime_type="video/3gpp" res="144p" fps="30fps" vcodec="mp4v.20.3" acodec="mp4a.40.2">]
64
 
65
  >>> # for dash streams
66
  [<Stream: itag="137" mime_type="video/mp4" res="1080p" fps="30fps" vcodec="avc1.640028">,
@@ -87,22 +87,22 @@ Library usage
87
  <Stream: itag="250" mime_type="audio/webm" abr="70kbps" acodec="opus">,
88
  <Stream: itag="251" mime_type="audio/webm" abr="160kbps" acodec="opus">]
89
 
90
- >>> # Notice that the list is ordered by lowest resolution to highest. If you
91
- >>> # wanted the highest resolution available for a specific file type, you
92
- >>> # can do:
93
- >>> yt.dash_streams.first()
94
- <Stream: itag="137" mime_type="video/mp4" res="1080p" fps="30fps" vcodec="avc1.640028">
95
 
96
- >>> # You can also get all videos for a given resolution
97
- >>> yt.dash_streams.filter(resolution='720p').all()
98
- [<Stream: itag="136" mime_type="video/mp4" res="720p" fps="30fps" vcodec="avc1.4d401f">,
99
- <Stream: itag="247" mime_type="video/webm" res="720p" fps="30fps" vcodec="vp9">]
100
 
101
- >>> # To select a video by a specific itag you can use the get method.
102
- >>> yt.dash_streams.get(251)
103
- <Stream: itag="251" mime_type="audio/webm" abr="160kbps" acodec="opus">
104
 
105
- # Okay, let's download it!
106
  >>> yt.dash_streams.get(251).download()
107
 
108
  Command-line usage
@@ -136,16 +136,16 @@ Once complete, execute the following commands:
136
 
137
  .. code:: bash
138
 
139
- git checkout master
140
 
141
- # Increment the version number and tag the release.
142
- bumpversion [major|minor|patch]
143
 
144
- # Upload the distribution to PyPi
145
- python setup.py sdist bdist_wheel upload
146
 
147
- # Since master often contains work-in-progress changes, increment the version
148
- # to a patch release to prevent inaccurate attribution.
149
- bumpversion --no-tag patch
150
 
151
- git push origin master --tags
 
48
 
49
  .. code:: python
50
 
51
+ >>> from pytube import YouTube
52
 
53
+ >>> yt = YouTube("http://www.youtube.com/watch?v=9bZkp7q19f0")
54
 
55
+ >>> # Once set, you can see all the codec and quality options YouTube has made
56
+ >>> # available for the particular video by printing videos.
57
 
58
+ >>> yt.streams.all()
59
+ [<Stream: itag="22" mime_type="video/mp4" res="720p" fps="30fps" vcodec="avc1.64001F" acodec="mp4a.40.2">,
60
+ <Stream: itag="43" mime_type="video/webm" res="360p" fps="30fps" vcodec="vp8.0" acodec="vorbis">,
61
+ <Stream: itag="18" mime_type="video/mp4" res="360p" fps="30fps" vcodec="avc1.42001E" acodec="mp4a.40.2">,
62
+ <Stream: itag="36" mime_type="video/3gpp" res="240p" fps="30fps" vcodec="mp4v.20.3" acodec="mp4a.40.2">,
63
+ <Stream: itag="17" mime_type="video/3gpp" res="144p" fps="30fps" vcodec="mp4v.20.3" acodec="mp4a.40.2">]
64
 
65
  >>> # for dash streams
66
  [<Stream: itag="137" mime_type="video/mp4" res="1080p" fps="30fps" vcodec="avc1.640028">,
 
87
  <Stream: itag="250" mime_type="audio/webm" abr="70kbps" acodec="opus">,
88
  <Stream: itag="251" mime_type="audio/webm" abr="160kbps" acodec="opus">]
89
 
90
+ >>> # Notice that the list is ordered by lowest resolution to highest. If you
91
+ >>> # wanted the highest resolution available for a specific file type, you
92
+ >>> # can do:
93
+ >>> yt.dash_streams.first()
94
+ <Stream: itag="137" mime_type="video/mp4" res="1080p" fps="30fps" vcodec="avc1.640028">
95
 
96
+ >>> # You can also get all videos for a given resolution
97
+ >>> yt.dash_streams.filter(resolution='720p').all()
98
+ [<Stream: itag="136" mime_type="video/mp4" res="720p" fps="30fps" vcodec="avc1.4d401f">,
99
+ <Stream: itag="247" mime_type="video/webm" res="720p" fps="30fps" vcodec="vp9">]
100
 
101
+ >>> # To select a video by a specific itag you can use the get method.
102
+ >>> yt.dash_streams.get(251)
103
+ <Stream: itag="251" mime_type="audio/webm" abr="160kbps" acodec="opus">
104
 
105
+ >>> # Okay, let's download it!
106
  >>> yt.dash_streams.get(251).download()
107
 
108
  Command-line usage
 
136
 
137
  .. code:: bash
138
 
139
+ git checkout master
140
 
141
+ # Increment the version number and tag the release.
142
+ bumpversion [major|minor|patch]
143
 
144
+ # Upload the distribution to PyPi
145
+ python setup.py sdist bdist_wheel upload
146
 
147
+ # Since master often contains work-in-progress changes, increment the version
148
+ # to a patch release to prevent inaccurate attribution.
149
+ bumpversion --no-tag patch
150
 
151
+ git push origin master --tags