viddl-rb 0.71 → 0.72
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +5 -1
- data/plugins/youtube.rb +11 -1
- metadata +96 -86
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ task :default => [:test]
|
|
6
6
|
|
7
7
|
Rake::TestTask.new(:test) do |t|
|
8
8
|
#t.pattern = "spec/*_spec.rb"
|
9
|
-
t.test_files = ["spec/lib_spec.rb", "spec/url_extraction_spec.rb"]
|
9
|
+
t.test_files = ["spec/lib_spec.rb", "spec/url_extraction_spec.rb", "spec/integration_spec.rb"]
|
10
10
|
end
|
11
11
|
|
12
12
|
Rake::TestTask.new(:test_lib) do |t|
|
@@ -16,3 +16,7 @@ end
|
|
16
16
|
Rake::TestTask.new(:test_extract) do |t|
|
17
17
|
t.test_files = FileList["spec/url_extraction_spec.rb"]
|
18
18
|
end
|
19
|
+
|
20
|
+
Rake::TestTask.new(:test_integration) do |t|
|
21
|
+
t.test_files = FileList["spec/integration_spec.rb"]
|
22
|
+
end
|
data/plugins/youtube.rb
CHANGED
@@ -187,8 +187,18 @@ class Youtube < PluginBase
|
|
187
187
|
|
188
188
|
#video_info_hash.keys.sort.each{|key| puts "#{key} : #{video_info_hash[key]}" }
|
189
189
|
download_url = video_info_hash["url_encoded_fmt_stream_map"][selected_format]
|
190
|
+
|
190
191
|
#if download url ends with a ';' followed by a codec string remove that part because it stops URI.parse from working
|
191
|
-
|
192
|
+
|
193
|
+
if codec_part = download_url[/;\s*codec.+/m] #if we have the ; codec substring
|
194
|
+
sig = codec_part[/&sig=(.+?)&/, 1] #extract the signature
|
195
|
+
|
196
|
+
download_url.sub!(codec_part, "") #remove the ; codec substring from the download url
|
197
|
+
download_url.concat("&signature=#{sig}") #concatenate the correct signature attribute
|
198
|
+
else
|
199
|
+
download_url.sub!("&sig=", "&signature=") #else we just have to change sig to signature
|
200
|
+
end
|
201
|
+
|
192
202
|
file_name = PluginBase.make_filename_safe(title) + "." + format_ext[selected_format][:extension]
|
193
203
|
puts "downloading to " + file_name
|
194
204
|
{:url => download_url, :name => file_name}
|
metadata
CHANGED
@@ -1,104 +1,101 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: viddl-rb
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 155
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 72
|
9
|
+
version: "0.72"
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
11
|
+
authors:
|
8
12
|
- Marc Seeger
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
|
17
|
+
date: 2012-10-03 00:00:00 +02:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: nokogiri
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: mechanize
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
33
24
|
none: false
|
34
|
-
requirements:
|
35
|
-
- -
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
38
32
|
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: mechanize
|
39
36
|
prerelease: false
|
40
|
-
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
38
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
47
49
|
name: rake
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :development
|
55
50
|
prerelease: false
|
56
|
-
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
52
|
none: false
|
58
|
-
requirements:
|
59
|
-
- -
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ! '>='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
70
60
|
type: :development
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: minitest
|
71
64
|
prerelease: false
|
72
|
-
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
66
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ! '>='
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '0'
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
86
74
|
type: :development
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: rest-client
|
87
78
|
prerelease: false
|
88
|
-
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
89
80
|
none: false
|
90
|
-
requirements:
|
91
|
-
- -
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
|
94
|
-
|
95
|
-
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
version: "0"
|
88
|
+
type: :development
|
89
|
+
version_requirements: *id005
|
90
|
+
description: An extendable commandline video downloader for flash video sites. Includes plugins for vimeo, youtube and megavideo
|
96
91
|
email: mail@marc-seeger.de
|
97
|
-
executables:
|
92
|
+
executables:
|
98
93
|
- viddl-rb
|
99
94
|
extensions: []
|
95
|
+
|
100
96
|
extra_rdoc_files: []
|
101
|
-
|
97
|
+
|
98
|
+
files:
|
102
99
|
- bin/helper/downloader.rb
|
103
100
|
- bin/helper/driver.rb
|
104
101
|
- bin/helper/parameter-parser.rb
|
@@ -121,28 +118,41 @@ files:
|
|
121
118
|
- Rakefile
|
122
119
|
- README.md
|
123
120
|
- TODO.txt
|
121
|
+
has_rdoc: false
|
124
122
|
homepage: https://github.com/rb2k/viddl-rb
|
125
123
|
licenses: []
|
124
|
+
|
126
125
|
post_install_message:
|
127
126
|
rdoc_options: []
|
128
|
-
|
127
|
+
|
128
|
+
require_paths:
|
129
129
|
- lib
|
130
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
131
|
none: false
|
132
|
-
requirements:
|
133
|
-
- -
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
|
136
|
-
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
hash: 3
|
136
|
+
segments:
|
137
|
+
- 0
|
138
|
+
version: "0"
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
140
|
none: false
|
138
|
-
requirements:
|
139
|
-
- -
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
hash: 19
|
145
|
+
segments:
|
146
|
+
- 1
|
147
|
+
- 3
|
148
|
+
- 4
|
141
149
|
version: 1.3.4
|
142
150
|
requirements: []
|
151
|
+
|
143
152
|
rubyforge_project: viddl-rb
|
144
|
-
rubygems_version: 1.
|
153
|
+
rubygems_version: 1.6.2
|
145
154
|
signing_key:
|
146
155
|
specification_version: 3
|
147
156
|
summary: An extendable commandline video downloader for flash video sites.
|
148
157
|
test_files: []
|
158
|
+
|