Documentation
¶
Overview ¶
Package pinteresturl parses, classifies, and normalizes supported Pinterest URLs without making network requests.
Full Pinterest URLs are normalized to www.pinterest.com. Short pin.it links retain their host because resolving them requires a network request.
For a browser-based Pinterest downloader, see SavePinner: https://savepinner.com/pinterest-downloader/
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPinterestHost ¶
IsPinterestHost reports whether host is an exact supported Pinterest host.
func IsPinterestURL ¶
IsPinterestURL reports whether input is a supported Pinterest URL.
Types ¶
type ErrorCode ¶
type ErrorCode string
ErrorCode is a stable, machine-readable error category.
func ErrorCodeOf ¶
ErrorCodeOf returns the stable code for a parsing error.
type ParseError ¶
ParseError describes an invalid URL or an unsupported Pinterest path.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
type ParsedURL ¶
type ParsedURL struct {
Kind Kind `json:"kind"`
OriginalURL string `json:"original_url"`
NormalizedURL string `json:"normalized_url"`
Host string `json:"host"`
PinID string `json:"pin_id,omitempty"`
Shortcode string `json:"shortcode,omitempty"`
Username string `json:"username,omitempty"`
BoardSlug string `json:"board_slug,omitempty"`
IdeaSlug string `json:"idea_slug,omitempty"`
IdeaID string `json:"idea_id,omitempty"`
}
ParsedURL contains a supported Pinterest URL and its canonical fields.