spidr_epg_gem 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/config_spidr_introductions +8 -0
- data/lib/spidr_epg/agent.rb +18 -2
- data/lib/spidr_epg/spidr.rb +2 -0
- data/spidr_epg_gem.gemspec +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjQ1NjIzN2NiMGVhMGQyMmFiZjNkYTJlMWI3NzdkNTg3NGViNmE1ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGViODFmYmViMzAxMmVkMzU4NjVkNDU1MzE2Y2I1MzZiYzQ2NjA2Yw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2UxZDQ4ZGRiMTRiMTM4ZWE3M2FhNzczODY4OTg0YjJhYjUxOGIyZjZlZDFk
|
10
|
+
OTkxMjM4NWNmNTk0ZGQ1Y2E1ZTRkMTc0MGE4NmJlNThiZjExMjg1MjA2NjUy
|
11
|
+
MDY0NGZmMTNkNjZhOGQwZjViZTExMDhiNGUwNDMxMzdlYmUwYTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTk5NmZmODVkOTRlZTc1MWY4YWMyNDUyY2UyNWJlOGVmNzQzOTliZjAwZTE3
|
14
|
+
Y2RkNzk2YTU0MDhiNzQ3M2FjYzBjNDViNTc0YzNiYjllMjcxZTU3ZjBhNzBl
|
15
|
+
NGVhNzMzOGI1MjVjZTU4NWFiN2U5YjZkMDRiMTk4ODU3ZGNhZjQ=
|
data/lib/spidr_epg/agent.rb
CHANGED
@@ -11,6 +11,7 @@ require 'spidr/spidr'
|
|
11
11
|
require 'openssl'
|
12
12
|
require 'net/http'
|
13
13
|
require 'set'
|
14
|
+
require 'yaml'
|
14
15
|
|
15
16
|
module Spidr
|
16
17
|
class Agent
|
@@ -20,6 +21,9 @@ module Spidr
|
|
20
21
|
include Events
|
21
22
|
include Actions
|
22
23
|
|
24
|
+
# Config with Spidr
|
25
|
+
attr_accessor :config_spidr
|
26
|
+
|
23
27
|
# HTTP Host Header to use
|
24
28
|
attr_accessor :host_header
|
25
29
|
|
@@ -121,6 +125,13 @@ module Spidr
|
|
121
125
|
@host_headers.merge!(options[:host_headers])
|
122
126
|
end
|
123
127
|
|
128
|
+
if options[:path_spidr_config]
|
129
|
+
path = options[:path_spidr_config]
|
130
|
+
self.config_spidr= YAML.load_file(path)
|
131
|
+
else
|
132
|
+
self.config_spidr= nil
|
133
|
+
end
|
134
|
+
|
124
135
|
@user_agent = options.fetch(:user_agent,Spidr.user_agent)
|
125
136
|
@referer = options[:referer]
|
126
137
|
|
@@ -487,8 +498,13 @@ module Spidr
|
|
487
498
|
return false
|
488
499
|
rescue Actions::Action
|
489
500
|
end
|
490
|
-
|
491
|
-
|
501
|
+
unless self.config_spidr
|
502
|
+
@queue << url
|
503
|
+
else
|
504
|
+
unless self.running?
|
505
|
+
|
506
|
+
end
|
507
|
+
end
|
492
508
|
@levels[url] = level
|
493
509
|
return true
|
494
510
|
end
|
data/lib/spidr_epg/spidr.rb
CHANGED
data/spidr_epg_gem.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spidr_epg_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zql
|
@@ -16,6 +16,7 @@ executables: []
|
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
|
+
- config_spidr_introductions
|
19
20
|
- lib/spidr.rb
|
20
21
|
- lib/spidr_epg.rb
|
21
22
|
- lib/spidr_epg/actions.rb
|