feedfinder

package module
v0.0.0-...-eca0977 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2015 License: MIT Imports: 5 Imported by: 0

README

Feedfinder

Build Status

Feedfinder is a Go library that you can use to discover feed links on web pages.

package main

import (
	"fmt"
	"log"

	"github.com/pilu/feedfinder"
)

func main() {
	links, err := feedfinder.Find("http://blog.golang.org")
	if err != nil {
		log.Fatal(err)
	}

	for _, link := range links {
		fmt.Printf("%s (%s): %s\n", link.Title, link.Type, link.URL.String())
	}
}

Author

Documentation

Overview

Package feedfinder - autodiscovers feed url on web pages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeedLink struct {
	Type  string
	Href  string
	Title string
	URL   *url.URL
}

A FeedLink represents the link tag with it's main attributes, Type, Href, Title and URL. The URL is always absolute, and it's based on the page's URL if the Href attribute is relative.

func Find

func Find(rawurl string) ([]*FeedLink, error)

Find searches for feed links on rawurl

Directories

Path Synopsis
cmd
feedfinder
Feedfinder discovers feed links on web pages.
Feedfinder discovers feed links on web pages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL