You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found your plugin but am struggling (I think) to configure it correctly.
Installed (successfully?)
fluent-gem install fluentd-plugin-rss
Fetching: fluent-plugin-rss-0.0.1.gem (100%)
Successfully installed fluent-plugin-rss-0.0.1
Parsing documentation for fluent-plugin-rss-0.0.1
Installing ri documentation for fluent-plugin-rss-0.0.1
Done installing documentation for fluent-plugin-rss after 0 seconds
1 gem installed
fluent-gem list
*** LOCAL GEMS ***
...
fluent-plugin-rss (0.0.1)
...
Configured (unclear)
Currently have both rss.conf and fluent-plugin-rss.conf
The 'type' property was not referenced but I think it should be 'rss'? Looking at your source (not a Ruby developer), it appears the 'tag' is to identify the emitted data so could be anything. I've tried various permutations of this:
<source>
type rss
tag cnn
url http://rss.cnn.com/rss/cnn_latest.rss
attrs date, title
</source>
Reviewing your code, it appears the RSS feed must contain a 'date' element. And I suspected this was the problem with the 1st feed that I tried which contained no 'date'. I extracted the RSS parsing and enumeration from your plugin (below). I've tried 2 other feeds that both use 'pubDate' (http://lorem-rss.herokuapp.com/feed; http://rss.cnn.com/rss/cnn_latest.rss) and these both work; they're 'put' and I assume would be emitted too.
#!/usr/bin/env ruby
require 'rss'
@tag = 'test'
@current_time = Time.new(2016,6,15,0,0,0, "+09:00").utc
@url = 'http://rss.cnn.com/rss/cnn_latest.rss'
next_current_time = @current_time
rss = RSS::Parser.parse(@url)
rss.items.each do |item|
time = Time.parse item.date.to_s
if time > @current_time
puts "#{@tag} --- #{Time.parse(item.date.to_s)} --- #{item.title}"
next_current_time = time if time > next_current_time
end
end
I see no evident output :-(
So I'm doing something wrong. Any help would be appreciated.
The text was updated successfully, but these errors were encountered:
When the date attribute does not exist, this plugins seems to fail to set the time attribute of the record.
I have plan to fix it and some known problems in this month.
I found your plugin but am struggling (I think) to configure it correctly.
Installed (successfully?)
Configured (unclear)
Currently have both rss.conf and fluent-plugin-rss.conf
The 'type' property was not referenced but I think it should be 'rss'? Looking at your source (not a Ruby developer), it appears the 'tag' is to identify the emitted data so could be anything. I've tried various permutations of this:
Reviewing your code, it appears the RSS feed must contain a 'date' element. And I suspected this was the problem with the 1st feed that I tried which contained no 'date'. I extracted the RSS parsing and enumeration from your plugin (below). I've tried 2 other feeds that both use 'pubDate' (http://lorem-rss.herokuapp.com/feed; http://rss.cnn.com/rss/cnn_latest.rss) and these both work; they're 'put' and I assume would be emitted too.
I see no evident output :-(
So I'm doing something wrong. Any help would be appreciated.
The text was updated successfully, but these errors were encountered: