Parses and normalizes supported Pinterest URLs without network requests.
The parser uses an exact hostname allowlist and removes query parameters and fragments from normalized URLs.
Summary
Functions
Returns the canonical form of a supported Pinterest URL.
Parses a Pinterest URL into its class, canonical URL, and identifier.
Parses a Pinterest URL and raises PinterestUrlNormalizer.Error on failure.
Returns whether a hostname exactly matches a supported Pinterest domain.
Returns whether the input is a supported Pinterest URL.
Functions
Returns the canonical form of a supported Pinterest URL.
Raises PinterestUrlNormalizer.Error for invalid or unsupported input.
@spec parse(term()) :: {:ok, PinterestUrlNormalizer.Result.t()} | {:error, PinterestUrlNormalizer.Error.t()}
Parses a Pinterest URL into its class, canonical URL, and identifier.
@spec parse!(String.t()) :: PinterestUrlNormalizer.Result.t()
Parses a Pinterest URL and raises PinterestUrlNormalizer.Error on failure.
Returns whether a hostname exactly matches a supported Pinterest domain.
Returns whether the input is a supported Pinterest URL.