youtube

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound is returned when a YouTube URL does not point at anything the API can find.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIKey string
}

Config contains the configurable fields for the YouTube parser.

type Parser

type Parser struct {
	Config *Config
}

Parser implements parsing of YouTube URLs via API.

func (*Parser) Init

func (p *Parser) Init(_ context.Context) error

Init initializes the parser.

func (*Parser) Name

func (p *Parser) Name() string

Name returns the parser's descriptive name.

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context, u *url.URL, referer *url.URL) (result parsers.ParseResult)

Parse parses the given URL.

Jump to

Keyboard shortcuts

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