rget 4.4.1 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/nicodl +3 -0
- data/bin/ulizadl +44 -0
- data/rget.gemspec +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18e07797f4bbf813a7a6c72ecd222821e0c08aac2c3ba94cef08c2524e08ac8b
|
4
|
+
data.tar.gz: a9a221ef18663ca77253ddea413612e28c320de291138530e4c7869871c04284
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89bfda21a389f9b18032fafa58f7bc9142e2be8b804745b076a8f54cf919b7fa29bd61da8b7cc6c9126d8bcc486181696da065c177f801fd9834edcf8437cef9
|
7
|
+
data.tar.gz: 7c5c3a364f2d094afce9d5c6c1fc58121714c1d55b4f1a69a8a82cb51ee72d164c96b09d0a7f2d25c7442b4cb1059d066953cb83328311163195068a9f0f53b8
|
data/bin/nicodl
CHANGED
data/bin/ulizadl
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "uri"
|
3
|
+
require "mechanize"
|
4
|
+
require 'open-uri'
|
5
|
+
|
6
|
+
if ARGV.size != 2
|
7
|
+
$stderr.puts "download TS file decoded by Uliza style video streaming"
|
8
|
+
$stderr.puts "ulizadl <playlist.m3u8> <output(.ts)>"
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
|
12
|
+
m3u8 = ARGV.shift
|
13
|
+
ts_file = "#{ARGV.shift}.ts"
|
14
|
+
|
15
|
+
begin
|
16
|
+
agent = Mechanize.new
|
17
|
+
agent.user_agent_alias = 'Windows Chrome'
|
18
|
+
agent.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
19
|
+
agent.get(m3u8)
|
20
|
+
body = agent.page.body
|
21
|
+
rescue ArgumentError
|
22
|
+
body = open(m3u8, &:read)
|
23
|
+
end
|
24
|
+
tses = body.scan(/.*\.ts.*/)
|
25
|
+
key_url = body.scan(/URI="(.*)"/).flatten.first
|
26
|
+
|
27
|
+
if key_url
|
28
|
+
key = agent.get_file(key_url)
|
29
|
+
decoder = OpenSSL::Cipher.new('aes-128-cbc')
|
30
|
+
decoder.key = key
|
31
|
+
decoder.decrypt
|
32
|
+
else
|
33
|
+
decoder = ''
|
34
|
+
def decoder.update(s); return s; end
|
35
|
+
end
|
36
|
+
|
37
|
+
open(ts_file, 'wb:ASCII-8BIT') do |ts|
|
38
|
+
tses.each_with_index do |file, count|
|
39
|
+
print "#{count+1}/#{tses.size}\r"
|
40
|
+
ts.write(decoder.update(agent.get_file(file)))
|
41
|
+
end
|
42
|
+
ts.write(decoder.final)
|
43
|
+
puts
|
44
|
+
end
|
data/rget.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "rget"
|
7
|
-
spec.version = "4.
|
7
|
+
spec.version = "4.5.0"
|
8
8
|
spec.authors = ["TADA Tadashi"]
|
9
9
|
spec.email = ["t@tdtds.jp"]
|
10
10
|
spec.description = %q{Downloading newest radio programs on the web. Supported radio stations are hibiki, onsen, niconico and freshlive.}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TADA Tadashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -144,6 +144,7 @@ executables:
|
|
144
144
|
- add_mp3info
|
145
145
|
- nicodl
|
146
146
|
- rget
|
147
|
+
- ulizadl
|
147
148
|
extensions: []
|
148
149
|
extra_rdoc_files: []
|
149
150
|
files:
|
@@ -155,6 +156,7 @@ files:
|
|
155
156
|
- bin/add_mp3info
|
156
157
|
- bin/nicodl
|
157
158
|
- bin/rget
|
159
|
+
- bin/ulizadl
|
158
160
|
- lib/dropbox.rb
|
159
161
|
- lib/freshlive.rb
|
160
162
|
- lib/hibiki.rb
|
@@ -185,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
187
|
version: '0'
|
186
188
|
requirements: []
|
187
189
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.7.
|
190
|
+
rubygems_version: 2.7.6
|
189
191
|
signing_key:
|
190
192
|
specification_version: 4
|
191
193
|
summary: Downloading newest radio programs on the web.
|