docstrings
Browse files- docs/user/quickstart.rst +25 -1
docs/user/quickstart.rst
CHANGED
@@ -5,4 +5,28 @@ Quickstart
|
|
5 |
|
6 |
This guide will walk you through the basic usage of pytube.
|
7 |
|
8 |
-
Let's get started with some
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
This guide will walk you through the basic usage of pytube.
|
7 |
|
8 |
+
Let's get started with some examples.
|
9 |
+
|
10 |
+
Downloading a Video
|
11 |
+
-------------------
|
12 |
+
|
13 |
+
Downloading a video from YouTube with pytube is incredibly easy.
|
14 |
+
|
15 |
+
Begin by importing the YouTube class::
|
16 |
+
|
17 |
+
>>> from pytube import YouTube
|
18 |
+
|
19 |
+
|
20 |
+
Now, let's try to download a video. For this example, let's take something
|
21 |
+
popular like PSY - Gangnam Style::
|
22 |
+
|
23 |
+
>>> stream = YouTube('https://www.youtube.com/watch?v=9bZkp7q19f0')
|
24 |
+
|
25 |
+
Now, we have a :class:`YouTube <pytube.YouTube>` object called ``stream``. We
|
26 |
+
can get all the information we need from this object.
|
27 |
+
|
28 |
+
The pytube API makes all forms of stream information intuitive to access. For
|
29 |
+
example, this is how you would get the video's title::
|
30 |
+
|
31 |
+
>>> stream.title
|
32 |
+
PSY - GANGNAM STYLE(강남스타일) M/V
|