Replace github.com/jteeuwen/... with own mirrors
This commit is contained in:
		
							parent
							
								
									3c7b7e5727
								
							
						
					
					
						commit
						816bb5df1d
					
				
					 1 changed files with 5 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue