collect

package
v0.0.0-...-40147a1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package collect provides methods for collecting the data from the DOM document

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collect

type Collect struct {
	// contains filtered or unexported fields
}

Collect settings

func New

func New(doc *goquery.Document) *Collect

New returns new Collect instance

func (Collect) Assets

func (collect Collect) Assets() map[string][]string

Assets returns all available and supported by us assets

func (Collect) Audio

func (collect Collect) Audio() (audio []string)

Audio returns all <audio> and <source> "src" attribute

func (Collect) Images

func (collect Collect) Images() (images []string)

Images returns all <img> "src" attribute TODO: Parse srcset attribute as well

func (collect Collect) Links(request *colly.Request) (links []string)

Links returns all <a> "href" attribute

func (Collect) Scripts

func (collect Collect) Scripts() (scripts []string)

Scripts returns all <script> "src" attribute

func (Collect) Styles

func (collect Collect) Styles() (links []string)

Styles returns all <link> "href" attribute

func (Collect) Title

func (collect Collect) Title() (text string)

Title gives text of the first <title>

func (Collect) Video

func (collect Collect) Video() (video []string)

Video returns all <video>, <kind> and <source> "src" attribute

Jump to

Keyboard shortcuts

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