Skip to content
/ rss Public
forked from SlyMarbo/rss

A Go library for fetching, parsing, and updating RSS feeds.

License

Notifications You must be signed in to change notification settings

runtakun/rss

Repository files navigation

rss

RSS is a small library for simplifying the parsing of RSS and Atom feeds. The package is currently fairly naive, and requires more testing.

Example:

package main

import (
	"github.com/SlyMarbo/rss"
)

func main() {
	feed, err := rss.Fetch("http://example.com/rss")
	if err != nil {
		// handle error.
	}
	
	// ... Some time later ...
	
	err = feed.Update()
	if err != nil {
		// handle error.
	}
}

The output structure is pretty much as you'd expect:

type Feed struct {
	Title       string
	Description string
	Link        string
	Image       *Image
	Items       []*Item
	Refresh     time.Time
	Unread      uint32
}

type Item struct {
	Title   string
	Content string
	Link    string
	Date    time.Time
	ID      string
	Read    bool
}

type Image struct {
	Title   string
	Url     string
	Height  uint32
	Width   uint32
}

About

A Go library for fetching, parsing, and updating RSS feeds.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%