Lib to analyze url

Hi,

My app allows users to store url.
As an example, for a song, a use can store a link to YouTube, Deezer, Spotify, iTunes, etc…

Do you know a lib capable of extracting the provider (Deezer, Spotify,…), the provider is (like the video I’d in YouTube), maybe more like the publication date ?

Thanks

Erlang can parse a URL to extract host:

:http_uri.parse 'http://erlang.org/doc/man/http_uri.html#parse-1'
{:ok, {:http, [], 'erlang.org', 80, '/doc/man/http_uri.html', []}}
1 Like

You can use Elixir for that as well via URI module. It will return Elixir struct instead of tuple though.

1 Like

There’s a difference though, Elixir does not validate the URL and expects it to be valid, Erlang does validate it and will give meaningful feedback if anything’s wrong.

Yeah, sure.
I juste have found https://iframely.com

It’s really near my use case