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