links

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowALL

func AllowALL(_ html.Token) bool

AllowALL - stub that implements TokenFilter, it allows all tokens.

func ExtractCSS

func ExtractCSS(r io.Reader, h URLHandler)

ExtractCSS extract urls from css files.

func ExtractHTML

func ExtractHTML(r io.Reader, base *url.URL, cfg HTMLParams)

ExtractHTML extract urls from html.

func ExtractJS

func ExtractJS(r io.Reader, h URLHandler)

ExtractJS extract urls from js files.

func ExtractSitemap

func ExtractSitemap(r io.Reader, b *url.URL, h URLHandler)

ExtractSitemap extract urls from sitemap*.xml.

Types

type HTMLHandler

type HTMLHandler func(atom.Atom, string)

HTMLHandler is a callback for found links.

type HTMLParams

type HTMLParams struct {
	Filter       TokenFilter
	HandleHTML   HTMLHandler
	HandleStatic URLHandler
	Brute        bool
	ScanJS       bool
	ScanCSS      bool
}

HTMLParams holds config for ExtractHTML.

type TokenFilter

type TokenFilter func(html.Token) bool

TokenFilter is a callback for token filtration.

type URLHandler

type URLHandler func(string)

URLHandler is a callback for links.

Jump to

Keyboard shortcuts

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