nficano commited on
Commit
fcb16f2
·
1 Parent(s): 76e5d62

Updated readme to show off more features.

Browse files
Files changed (1) hide show
  1. README.rst +23 -17
README.rst CHANGED
@@ -5,17 +5,13 @@ couple hours of hackin'. I should have them fixed quickly though. Enjoy!
5
 
6
  TODO
7
  ----
8
- 1. Finish writing the docstrings.
9
- 2. Fix the known bugs.
10
- 3. Add a couple small features, like output path.
11
- 4. Write unit tests.
12
- 5. Add setup.py.
13
- 6. Remove requests, its a single GET request - I think urllib2 should suffice.
14
 
15
  Installation
16
  ------------
17
- 1. pip install requests
18
- 2. guess that's it.. add it to your PYTHON PATH if you'd like.
19
 
20
  Usage example
21
  -------------
@@ -23,23 +19,33 @@ Usage example
23
 
24
  >>> from youtube import YouTube
25
  >>> yt = YouTube()
26
- >>> yt.url = "http://www.youtube.com/watch?v=oHg5SJYRHA0"
27
 
28
  >>> # View all encoding/quality options.
29
  >>> yt.videos
30
- [<Video: flv - 360p>, <Video: mp4 - 360p>, <Video: flv - 224p>]
 
 
 
 
 
 
 
 
 
 
31
 
32
  >>> # Similar to the Django ORM, you can filter.
33
  >>> yt.filter('flv')
34
- [<Video: flv - 360p>, <Video: flv - 224p>]
35
 
36
- >>> yt.filter(res='360p')
37
- [<Video: flv - 360p>, <Video: mp4 - 360p>]
38
 
39
  >>> # You can even use get()
40
- >>> rick_astley = yt.get('mp4')
41
 
42
  >>> # Okay, let's download!
43
- >>> rick_astley.download()
44
- Downloading: RickRollD.mp4 Bytes: 10407900
45
- 2449408 [23.53%]
 
5
 
6
  TODO
7
  ----
8
+ 1. Add a couple small features, like output path.
9
+ 2. Write unit tests.
10
+ 3. Add setup.py.
 
 
 
11
 
12
  Installation
13
  ------------
14
+ 1. Add it to your PYTHON PATH if you'd like, not much to her.
 
15
 
16
  Usage example
17
  -------------
 
19
 
20
  >>> from youtube import YouTube
21
  >>> yt = YouTube()
22
+ >>> yt.url = "http://www.youtube.com/watch?v=Ik-RsDGPI5Y"
23
 
24
  >>> # View all encoding/quality options.
25
  >>> yt.videos
26
+ [<Video: mp4 - 720p>,
27
+ <Video: webm - 480p>,
28
+ <Video: flv - 480p>,
29
+ <Video: webm - 360p>,
30
+ <Video: flv - 360p>,
31
+ <Video: mp4 - 360p>,
32
+ <Video: flv - 224p>]
33
+
34
+ >>> #Set the filename, or get the default.
35
+ >>> yt.filename
36
+ 'Pulp Fiction - Dancing Scene'
37
 
38
  >>> # Similar to the Django ORM, you can filter.
39
  >>> yt.filter('flv')
40
+ [<Video: flv - 480p>, <Video: flv - 360p>, <Video: flv - 224p>]
41
 
42
+ >>> yt.filter(res='480p')
43
+ [<Video: webm - 480p>, <Video: flv - 480p>]
44
 
45
  >>> # You can even use get()
46
+ >>> video = yt.get('mp4', '720p')
47
 
48
  >>> # Okay, let's download!
49
+ >>> video.download()
50
+ Downloading: Pulp Fiction - Dancing Scene.mp4 Bytes: 37561829
51
+ 37561829 [100.00%]