parser

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

func NewParser

func NewParser(xpath string) *Parser

NewParser creates a new Parser instance with the given XPath expression.

func (*Parser) ParseFileURL

func (p *Parser) ParseFileURL(url string) (string, error)

ParseFileURL takes a URL and extracts the file URL from it by using the stored XPath expression. The function returns the extracted URL and an error if the XPath expression does not match any node or if the node does not have an href attribute.

Jump to

Keyboard shortcuts

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