musixScrape

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUserAgent = "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
	DefaultSearchUrl = "https://www.musixmatch.com/search/"
	DefaultTimeout   = time.Second * 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	SearchUrl  string
	UserAgent  string
	HttpClient *http.Client
}

func New

func New() *Client

New builds a Client with default settings. If you want to change them, change them after calling New or construct the Client manually

func (*Client) GetLyrics added in v1.2.0

func (c *Client) GetLyrics(url *url.URL) (Lyrics, error)

func (*Client) Search

func (c *Client) Search(query string) ([]SearchResult, error)

type Lyrics added in v1.2.0

type Lyrics struct {
	Artist, Song, Lyrics string
}

type SearchResult added in v1.2.0

type SearchResult struct {
	Artist, Song string
	Url          *url.URL
}

Jump to

Keyboard shortcuts

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