hlspider 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -1
- data/bin/hlspider +9 -2
- data/lib/hlspider/version.rb +1 -1
- metadata +5 -8
- data/Gemfile.lock +0 -28
data/README.md
CHANGED
@@ -9,6 +9,8 @@ Point HLSpider at multiple playlists and it will report back on whether or not t
|
|
9
9
|
|
10
10
|
## Usage
|
11
11
|
|
12
|
+
### Ruby
|
13
|
+
|
12
14
|
```
|
13
15
|
# Point the spider at multiple playlists
|
14
16
|
playlists = ["http://host.com/video1/playlist1.m3u8", "http://host.com/video1/playlist2.m3u8", "http://host.com/video1/playlist3.m3u8"]
|
@@ -35,7 +37,7 @@ playlist.file
|
|
35
37
|
playlist.target_duration
|
36
38
|
```
|
37
39
|
|
38
|
-
|
40
|
+
### Command line
|
39
41
|
|
40
42
|
```
|
41
43
|
hlspider --playlists=http://host.com/video1/playlist1.m3u8,http://host.com/video1/playlist2.m3u8,http://host.com/video1/playlist3.m3u8
|
@@ -46,3 +48,9 @@ OR
|
|
46
48
|
```
|
47
49
|
hlspider --playlists=http://host.com/video1/all_bitrates_playlist.m3u8
|
48
50
|
```
|
51
|
+
|
52
|
+
#### Options
|
53
|
+
```
|
54
|
+
--loop TIMES - How many times the spider should compare the playlists.
|
55
|
+
--sleep SECONDS - How many seconds the spider should sleep between loops.
|
56
|
+
```
|
data/bin/hlspider
CHANGED
@@ -21,7 +21,12 @@ opts_parser = OptionParser.new do |opts|
|
|
21
21
|
options[:loop] = 1
|
22
22
|
opts.on('-l', '--loop TIMES', Integer) do |l|
|
23
23
|
options[:loop] = l || 5
|
24
|
-
end
|
24
|
+
end
|
25
|
+
|
26
|
+
options[:sleep] = 3
|
27
|
+
opts.on('-s', '--sleep SECONDS', Integer) do |s|
|
28
|
+
options[:sleep] = s
|
29
|
+
end
|
25
30
|
|
26
31
|
opts.on( '-h', '--help', 'Display this screen' ) do
|
27
32
|
puts opts
|
@@ -48,5 +53,7 @@ while x <= options[:loop] do
|
|
48
53
|
|
49
54
|
break if @errors
|
50
55
|
|
51
|
-
x += 1
|
56
|
+
x += 1 unless options[:loop] == 0
|
57
|
+
|
58
|
+
sleep(options[:sleep])
|
52
59
|
end
|
data/lib/hlspider/version.rb
CHANGED
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- brookemckim
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2012-05-03 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: eventmachine
|
@@ -81,7 +80,6 @@ files:
|
|
81
80
|
- .gitignore
|
82
81
|
- .rbenv-version
|
83
82
|
- Gemfile
|
84
|
-
- Gemfile.lock
|
85
83
|
- LICENSE
|
86
84
|
- README.md
|
87
85
|
- Rakefile
|
@@ -97,7 +95,6 @@ files:
|
|
97
95
|
- spec/hlspider/spider_spec.rb
|
98
96
|
- spec/hlspider_spec.rb
|
99
97
|
- spec/spec_helper.rb
|
100
|
-
has_rdoc: true
|
101
98
|
homepage: http://www.github.com/brookemckim/hlspider
|
102
99
|
licenses: []
|
103
100
|
|
@@ -127,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
124
|
requirements: []
|
128
125
|
|
129
126
|
rubyforge_project: hlspider
|
130
|
-
rubygems_version: 1.
|
127
|
+
rubygems_version: 1.8.24
|
131
128
|
signing_key:
|
132
129
|
specification_version: 3
|
133
130
|
summary: Asynchronously download and parse .m3u8 playlists.
|
data/Gemfile.lock
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
hlspider (0.2.0)
|
5
|
-
em-http-request
|
6
|
-
eventmachine
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: http://rubygems.org/
|
10
|
-
specs:
|
11
|
-
addressable (2.2.6)
|
12
|
-
em-http-request (1.0.0)
|
13
|
-
addressable (>= 2.2.3)
|
14
|
-
em-socksify
|
15
|
-
eventmachine (>= 1.0.0.beta.3)
|
16
|
-
http_parser.rb (>= 0.5.2)
|
17
|
-
em-socksify (0.1.0)
|
18
|
-
eventmachine
|
19
|
-
eventmachine (1.0.0.beta.4)
|
20
|
-
http_parser.rb (0.5.3)
|
21
|
-
minitest (2.7.0)
|
22
|
-
|
23
|
-
PLATFORMS
|
24
|
-
ruby
|
25
|
-
|
26
|
-
DEPENDENCIES
|
27
|
-
hlspider!
|
28
|
-
minitest
|