mercury

A simple wrapper for the Mercury Web Parser API (https://mercury.postlight.com/web-parser/), powered by HTTPoison.


License
MIT

Documentation

Mercury

A simple wrapper for the Mercury Web Parser API, powered by HTTPoison.

Installation

If available in Hex, the package can be installed as:

  1. Add mercury to your list of dependencies in mix.exs:

    def deps do
      [
                {:mercury, "~> 0.1.1"},
            ]
    end
  2. Add your Mercury API key to your config.exs

    config :mercury, api_key: "<your_mercury_api_key>"

If you don't already have one, you can sign up for a Mercury Parser API key here.

Usage

To fetch the content for an article, run:

{:ok, response} = Mercury.parse("https://trackchanges.postlight.com/extracting-content-from-the-chaos-of-the-web-introducing-the-mercury-web-parser-e920a1db7f86")

# -- OR --

%{body: body} = Mercury.parse!("https://trackchanges.postlight.com/extracting-content-from-the-chaos-of-the-web-introducing-the-mercury-web-parser-e920a1db7f86")