funkspector v0.9.1 Funkspector.Utils

Common functionality for the scrapers.

Link to this section Summary

Functions

Given a collection of URLs and a base URL, absolutifies the relative links.

Link to this section Functions

Link to this function

absolutify(links, base_url)

Given a collection of URLs and a base URL, absolutifies the relative links.

Examples

iex> Funkspector.Utils.absolutify(["javascript:alert(hi)", "/faqs?section=legal", "/about", "http://example.com/faqs"], "http://example.com")
["javascript:alert(hi)", "http://example.com/faqs?section=legal", "http://example.com/about", "http://example.com/faqs"]