fetch

package
v0.0.0-...-8f4005c Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetArticleUrlsFromFeed

func GetArticleUrlsFromFeed(url string, ch chan *ArticleUrlsChan)

Types

type ArticleFeedIn

type ArticleFeedIn struct {
	Content []*struct {
		Url string `json:"url"`
	} `json:"content"`
}

func (*ArticleFeedIn) Urls

func (a *ArticleFeedIn) Urls() []string

type ArticleIn

type ArticleIn struct {
	Site      string
	Url       string
	ArticleId int
	Doc       *gq.Document
}

func NewArticleIn

func NewArticleIn(url string) *ArticleIn

func (*ArticleIn) GetData

func (a *ArticleIn) GetData() error

func (*ArticleIn) GetSiteFromHost

func (a *ArticleIn) GetSiteFromHost(host string) (string, error)

func (*ArticleIn) IsValid

func (a *ArticleIn) IsValid() bool

func (*ArticleIn) Process

func (a *ArticleIn) Process(article *m.Article) error

func (*ArticleIn) String

func (a *ArticleIn) String() string

type ArticleProcess

type ArticleProcess struct {
	*m.Article
	*m.ExtractedBody
	Html string
	Err  error
}

Processor object that contains the Article to be saved as well as the body text

func ParseArticleAtURL

func ParseArticleAtURL(articleUrl string, runExtraction bool) *ArticleProcess

Primary entry point to process an article's json based on the article Url

func (*ArticleProcess) String

func (p *ArticleProcess) String() string

type ArticleUrlsChan

type ArticleUrlsChan struct {
	Urls []string
	Err  error
}

Jump to

Keyboard shortcuts

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