logstash-input-multirss 1.0.3 → 1.0.4
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/README.md +1 -0
- data/lib/logstash/inputs/multirss.rb +9 -15
- data/logstash-input-multirss.gemspec +2 -2
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d13c2d879087de0b4230d214cbd8891a5bd37a8e09a2903b04972a9d7b4988e
|
4
|
+
data.tar.gz: ca9b18b29aa8abd00a0852c1cf350f80a883d4ebf927a012dd3aefd8a730e223
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da7b2da25c8c33955570efd6bf4769d492dee02ac031a0bd3bb9e987465bcffc245e9a3cf3786471c0f5a84203ff1cca74180638e6f5309be7b0dcc539b31b98
|
7
|
+
data.tar.gz: 99e28af4b277e09ac34ef0c1b4dbe838c68014bcb39d28cd312cbc7bca8e4382e78cf141107deca9a8cae826166a10d8615586f7ea74354f5fb2cba040b6d748
|
data/README.md
CHANGED
@@ -23,6 +23,7 @@ You can see a example in https://github.com/felixramirezgarcia/logstash-input-mu
|
|
23
23
|
The difference between the attributes multi_feed and one_feed is that the multi_feed is the URI of the parent address where several rss (xml) are found. For the case where you want to explore only one of those links you can use the one_feed attribute. A visual example can be seen by visiting the following links:
|
24
24
|
|
25
25
|
Father (multi_feed) => http://rss.elmundo.es/rss/
|
26
|
+
|
26
27
|
Son (one_feed) => http://estaticos.elmundo.es/elmundo/rss/portada.xml
|
27
28
|
|
28
29
|
## Documentation
|
@@ -41,8 +41,7 @@ class LogStash::Inputs::Multirss < LogStash::Inputs::Base
|
|
41
41
|
while !stop?
|
42
42
|
|
43
43
|
@multi_feed.each do |rss|
|
44
|
-
|
45
|
-
#puts str
|
44
|
+
puts "Read parent: " + rss
|
46
45
|
begin
|
47
46
|
page = @agent.get(rss)
|
48
47
|
page.links.each do |link|
|
@@ -50,20 +49,17 @@ class LogStash::Inputs::Multirss < LogStash::Inputs::Base
|
|
50
49
|
urls << link.href
|
51
50
|
end
|
52
51
|
end
|
53
|
-
rescue
|
54
|
-
|
55
|
-
#puts str
|
52
|
+
rescue
|
53
|
+
puts "Fail to get " + rss + " childrens links"
|
56
54
|
end
|
57
55
|
|
58
56
|
links = urls.uniq
|
59
57
|
links.each do |link|
|
60
58
|
begin
|
61
59
|
response_link(link,queue)
|
62
|
-
|
63
|
-
#puts str
|
60
|
+
puts "Read clidren: " + link
|
64
61
|
rescue
|
65
|
-
|
66
|
-
#puts str
|
62
|
+
puts "Fail to get " + link + " children"
|
67
63
|
next
|
68
64
|
end
|
69
65
|
end
|
@@ -79,11 +75,9 @@ class LogStash::Inputs::Multirss < LogStash::Inputs::Base
|
|
79
75
|
all_links.each do |link|
|
80
76
|
begin
|
81
77
|
response_link(link,queue)
|
82
|
-
|
83
|
-
#puts str
|
78
|
+
puts "Read clidren: " + link
|
84
79
|
rescue
|
85
|
-
|
86
|
-
#puts str
|
80
|
+
puts "Fail to get " + link
|
87
81
|
next
|
88
82
|
end # begin
|
89
83
|
end # all_links loop
|
@@ -121,9 +115,9 @@ class LogStash::Inputs::Multirss < LogStash::Inputs::Base
|
|
121
115
|
retry if (tried > 0)
|
122
116
|
end
|
123
117
|
|
124
|
-
@logger.error("Error : ", :exception => ex)
|
118
|
+
@logger.error("Error with #{link}: ", :exception => ex)
|
125
119
|
rescue => exc
|
126
|
-
@logger.error("Uknown error while parsing the feed", :exception => exc)
|
120
|
+
@logger.error("Uknown error while parsing the #{link} feed", :exception => exc)
|
127
121
|
end # begin
|
128
122
|
end # def response_link
|
129
123
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-multirss'
|
3
|
-
s.version = '1.0.
|
3
|
+
s.version = '1.0.4'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = 'Simple multi rss plugin'
|
6
|
-
s.description = 'This plugin
|
6
|
+
s.description = 'This plugin get the feed content and works with : \n multi_feed => [array] URI parent with more rss links inside , something like this: http://rss.elmundo.es/rss/ \n one_feed => [array] (optionally) childs URIS with XML content inside , something like this: http://estaticos.elmundo.es/elmundo/rss/portada.xml \n blacklist => [array] (optionally) strings , links, text ... what you dont want explored'
|
7
7
|
s.homepage = 'https://github.com/felixramirezgarcia/logstash-input-multirss'
|
8
8
|
s.authors = ['Felix R G']
|
9
9
|
s.email = 'felixramirezgarcia@correo.ugr.es'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-multirss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix R G
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,8 +94,11 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
description: This plugin
|
98
|
-
|
97
|
+
description: 'This plugin get the feed content and works with : \n multi_feed => [array]
|
98
|
+
URI parent with more rss links inside , something like this: http://rss.elmundo.es/rss/ \n
|
99
|
+
one_feed => [array] (optionally) childs URIS with XML content inside , something
|
100
|
+
like this: http://estaticos.elmundo.es/elmundo/rss/portada.xml \n blacklist => [array]
|
101
|
+
(optionally) strings , links, text ... what you dont want explored'
|
99
102
|
email: felixramirezgarcia@correo.ugr.es
|
100
103
|
executables: []
|
101
104
|
extensions: []
|