youtube_utils 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/youtube_utils.rb +3 -2
- metadata +27 -34
data/lib/youtube_utils.rb
CHANGED
@@ -89,10 +89,11 @@ class YoutubeUtils
|
|
89
89
|
h = querystring_2_hash(x)
|
90
90
|
itag = h['itag']
|
91
91
|
url = h['url']
|
92
|
+
sig = h['sig']
|
92
93
|
|
93
94
|
a21 = a2[i].split('/')
|
94
95
|
resolution = a21[1]
|
95
|
-
result << {'url' => URI.unescape(url), 'type' => convert_itag_to_type(itag), 'quality' => resolution2quality(resolution)}
|
96
|
+
result << {'url' => URI.unescape(url) + "&signature=#{sig}", 'type' => convert_itag_to_type(itag), 'quality' => resolution2quality(resolution)}
|
96
97
|
i += 1;
|
97
98
|
}
|
98
99
|
return result
|
@@ -147,6 +148,6 @@ class YoutubeUtils
|
|
147
148
|
end
|
148
149
|
|
149
150
|
if __FILE__ == $0
|
150
|
-
p YoutubeUtils.new(true).get_videos "http://www.youtube.com/watch?v=
|
151
|
+
p YoutubeUtils.new(true).get_videos "http://www.youtube.com/watch?v=FZTCmkyQAdM"
|
151
152
|
end
|
152
153
|
|
metadata
CHANGED
@@ -1,56 +1,49 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: youtube_utils
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
4
5
|
prerelease:
|
5
|
-
version: 0.1.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
|
7
|
+
authors:
|
8
|
+
- Xue Yong Zhi
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
date: 2011-04-28 00:00:00 Z
|
12
|
+
date: 2011-04-28 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
15
|
-
|
16
14
|
description:
|
17
|
-
email:
|
18
|
-
|
19
|
-
executables:
|
20
|
-
|
15
|
+
email:
|
16
|
+
- yong@intridea.com
|
17
|
+
executables:
|
18
|
+
- youtube_utils
|
21
19
|
extensions: []
|
22
|
-
|
23
20
|
extra_rdoc_files: []
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
- bin/youtube_utils
|
21
|
+
files:
|
22
|
+
- lib/youtube_utils.rb
|
23
|
+
- bin/youtube_utils
|
28
24
|
homepage: http://github.com/yong/youtube_utils
|
29
25
|
licenses: []
|
30
|
-
|
31
26
|
post_install_message:
|
32
27
|
rdoc_options: []
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
37
31
|
none: false
|
38
|
-
requirements:
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
37
|
none: false
|
44
|
-
requirements:
|
45
|
-
|
46
|
-
|
47
|
-
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
48
42
|
requirements: []
|
49
|
-
|
50
43
|
rubyforge_project:
|
51
|
-
rubygems_version: 1.8.
|
44
|
+
rubygems_version: 1.8.10
|
52
45
|
signing_key:
|
53
46
|
specification_version: 3
|
54
47
|
summary: youtube downloader
|
55
48
|
test_files: []
|
56
|
-
|
49
|
+
has_rdoc:
|