entry

package
v0.0.0-...-3da5846 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2015 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddByItem

func AddByItem(s *models.Entry, it *rss.Item, b *models.Blog) (int64, error)

func AddsByChannels

func AddsByChannels(chs []*rss.Channel, b *models.Blog) (entries []*models.Entry, errs []error)

func UpdateSocials

func UpdateSocials(entry *models.Entry)

Types

type Extractor

type Extractor struct {
	*behavior.UserBehavior
	// contains filtered or unexported fields
}

func NewExtractor

func NewExtractor() *Extractor

func (*Extractor) ByNames

func (e *Extractor) ByNames(names []string) (choices []string)

Extracting by string array in Title, Content

.. note:: 3 chars less word will not extract in function.

func (*Extractor) Codes

func (e *Extractor) Codes() (codes []string)

iframe or script or object srcとurlでcontains ableなもの

func (*Extractor) Do

func (e *Extractor) Do(entry *models.Entry) error

Do parsing document

func (*Extractor) Doc

func (e *Extractor) Doc(urlStr string) (*gq.Document, error)

func (*Extractor) Duration

func (e *Extractor) Duration()

func (*Extractor) Imgs

func (e *Extractor) Imgs() (imgs []*Img)

Extracting img tag

func (*Extractor) Urls

func (e *Extractor) Urls() (urls []string)

Extracting ExternalURLs

type Img

type Img struct {
	Src string
	Alt string
}

Jump to

Keyboard shortcuts

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