downthetube 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
data/README
CHANGED
@@ -10,30 +10,53 @@ gem 'downthetube'
|
|
10
10
|
|
11
11
|
Usage:
|
12
12
|
|
13
|
+
In irb you need to do the requires:
|
14
|
+
require 'rubygems'
|
15
|
+
require 'downthetube'
|
13
16
|
|
14
|
-
|
15
|
-
|
16
|
-
irb(main):
|
17
|
+
And then play. I've tried to make it do what you would expect:
|
18
|
+
|
19
|
+
irb(main):018:0> pl = Youtube::Playlist.new "76E01802262A6694"
|
20
|
+
=> #<Youtube::Playlist:0x7ff91ce51f38 @url="http://gdata.youtube.com/feeds/api/playlists/76E01802262A6694">
|
21
|
+
|
22
|
+
irb(main):019:0> playlists = Youtube.playlists_for "stephensam"
|
23
|
+
=> [#<Youtube::Playlist:0x7ff91ce214c8 @client=#<GData::Client::YouTube:0x7ff91ce1e9a8 @source="AnonymousApp", @http_service=GData::HTTP::DefaultService, @clientlogin_url="https://www.google.com/youtube/accounts/ClientLogin", @authsub_scope="http://gdata.youtube.com", @version="2", @headers={}, @clientlogin_service="youtube">, @url="http://gdata.youtube.com/feeds/api/playlists/76E01802262A6694", @author="stephensam", @xml=<entry gd:etag='W/"CUQGR347eCp7ImA9WhZVGEk."'> ... </>, @title="Capoeira Angola", @id="76E01802262A6694">]
|
24
|
+
|
25
|
+
irb(main):021:0> playlists.first.title
|
17
26
|
=> "Capoeira Angola"
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
irb(main):
|
23
|
-
=> [#<Youtube::Video:
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
irb(main):
|
29
|
-
=> "
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
irb(main):
|
35
|
-
=> "http://www.youtube.com/watch?v=
|
36
|
-
|
27
|
+
|
28
|
+
irb(main):022:0> playlists.class
|
29
|
+
=> Array
|
30
|
+
|
31
|
+
irb(main):023:0> vids = playlists.first.videos 2
|
32
|
+
=> [#<Youtube::Video:0x7ff91cf63098 @xml=<entry gd:etag='W/"AkQDQ3s-fCp7ImA9WhZUEkk."'> ... </>>, #<Youtube::Video:0x7ff91cf59bd8 @xml=<entry gd:etag='W/"AkQDQ3s-fCp7ImA9WhZUEkk."'> ... </>>]
|
33
|
+
|
34
|
+
irb(main):024:0> vid = vids.last
|
35
|
+
=> #<Youtube::Video:0x7ff91cf59bd8 @xml=<entry gd:etag='W/"AkQDQ3s-fCp7ImA9WhZUEkk."'> ... </>>
|
36
|
+
|
37
|
+
irb(main):025:0> vid.title
|
38
|
+
=> "Mestre Jogo De Dentro e Mestra Tisza,Ilheus 2008"
|
39
|
+
|
40
|
+
irb(main):026:0> vid.description
|
41
|
+
=> "Roda de fim de ano na praca de Ilheus 2008,gravado por CM Denis."
|
42
|
+
|
43
|
+
irb(main):027:0> vid.url
|
44
|
+
=> "http://www.youtube.com/watch?v=4I_4JgV-y8s"
|
45
|
+
|
46
|
+
irb(main):028:0> vid.thumbnail :large
|
47
|
+
=> "http://i.ytimg.com/vi/4I_4JgV-y8s/hqdefault.jpg"
|
48
|
+
|
49
|
+
irb(main):029:0> itapua = Youtube::Video.new "5Pg6a3TbF68"
|
50
|
+
=> #<Youtube::Video:0x7ff91cf097a0 @url="http://gdata.youtube.com/feeds/api/videos/5Pg6a3TbF68?v=2">
|
51
|
+
|
52
|
+
irb(main):030:0> itapua.thumbnail
|
53
|
+
=> "http://i.ytimg.com/vi/5Pg6a3TbF68/default.jpg"
|
54
|
+
|
55
|
+
irb(main):031:0> itapua.title
|
56
|
+
=> "Itapuã e Gibi - Roda Lavradio"
|
57
|
+
|
58
|
+
irb(main):032:0> itapua.url
|
59
|
+
=> "http://www.youtube.com/watch?v=5Pg6a3TbF68"
|
37
60
|
|
38
61
|
|
39
62
|
LICENSE:
|
data/downthetube.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
specification = Gem::Specification.new do |spec|
|
2
2
|
# Descriptive and source information for this gem.
|
3
3
|
spec.name = "downthetube"
|
4
|
-
spec.version = "0.0.
|
4
|
+
spec.version = "0.0.5"
|
5
5
|
spec.description = "A library to make downloading playlists and videos from Youtube less nasty."
|
6
6
|
spec.summary = "Downloads playlists and videos from Youtube."
|
7
7
|
spec.author = "Mike Williamson"
|
8
8
|
spec.email = "blessedbyvirtuosity@gmail.com"
|
9
9
|
spec.homepage = ""
|
10
10
|
require 'rake'
|
11
|
-
spec.files = %w(README lib/downthetube/youtube.rb lib/
|
11
|
+
spec.files = %w(README lib/downthetube.rb lib/youtube.rb lib/video.rb lib/play_list.rb downthetube.gemspec)
|
12
12
|
spec.has_rdoc = false
|
13
13
|
spec.add_dependency("gdata", ">= 1.0.0")
|
14
14
|
spec.extra_rdoc_files = ["README"]
|
data/lib/downthetube.rb
ADDED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: downthetube
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mike Williamson
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-05 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -44,9 +44,10 @@ extra_rdoc_files:
|
|
44
44
|
- README
|
45
45
|
files:
|
46
46
|
- README
|
47
|
-
- lib/downthetube
|
48
|
-
- lib/
|
49
|
-
- lib/
|
47
|
+
- lib/downthetube.rb
|
48
|
+
- lib/youtube.rb
|
49
|
+
- lib/video.rb
|
50
|
+
- lib/play_list.rb
|
50
51
|
- downthetube.gemspec
|
51
52
|
has_rdoc: true
|
52
53
|
homepage: ""
|