Packages
Parse, classify, and normalize Pinterest URLs without network requests.
Current section
Files
Jump to
Current section
Files
pinterest_url_normalizer
README.md
README.md
# Pinterest URL Normalizer for Elixir
Parse, classify, and normalize Pinterest URLs without network requests. The
package uses an exact Pinterest host allowlist and rejects lookalike domains,
credentials, non-HTTPS URLs, encoded paths, and non-standard ports.
## Installation
Add `pinterest_url_normalizer` to your dependencies:
```elixir
def deps do
[
{:pinterest_url_normalizer, "~> 0.1.0"}
]
end
```
## Usage
```elixir
PinterestUrlNormalizer.normalize(
"https://www.pinterest.co.uk/pin/example--123456789/?utm_source=test"
)
# "https://www.pinterest.com/pin/123456789/"
```
Supported URL classes are Pin, `pin.it` short link, profile, board, and Ideas.
This package does not download media or make network requests. For an online
Pinterest downloader, use [SavePinner](https://savepinner.com/pinterest-downloader/).
MIT licensed.