rss -> gorss

This commit is contained in:
an 2018-02-21 22:30:24 +01:00
parent 816bb5df1d
commit 574fe38d38
1 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ import (
"os"
"time"
"git.dnix.de/an/rss"
"git.dnix.de/an/gorss"
"git.dnix.de/an/xlog"
"git.dnix.de/an/xmlx"
)
@ -53,7 +53,7 @@ func rssHandleMessage(m *Message) {
}
func rssPollFeed(uri string, timeout int, cr xmlx.CharsetFunc) {
feed := rss.New(timeout, true, rssChanHandler, rssItemHandler)
feed := gorss.New(timeout, true, rssChanHandler, rssItemHandler)
for {
xlog.Info("Polling feed: %s", uri)
if err := feed.Fetch(uri, cr); err != nil {
@ -65,11 +65,11 @@ func rssPollFeed(uri string, timeout int, cr xmlx.CharsetFunc) {
}
}
func rssChanHandler(feed *rss.Feed, newchannels []*rss.Channel) {
func rssChanHandler(feed *gorss.Feed, newchannels []*gorss.Channel) {
//SayCh <- fmt.Sprintf("%s\n[RSS] %d new channel(s) in %s", "*", len(newchannels), feed.Url)
}
func rssItemHandler(feed *rss.Feed, ch *rss.Channel, newitems []*rss.Item) {
func rssItemHandler(feed *gorss.Feed, ch *gorss.Channel, newitems []*gorss.Item) {
if hideOutput {
return
}