You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Shadowfacts 1538ca2a8c
Remove HTTPoison application
8 months ago
config Allow HTTPoison options to be specified in config 5 years ago
lib Remove HTTPoison dependency 2 years ago
test Ensure `remove_tag` returns a valid html_tree 3 years ago
.formatter.exs Add Elixir 1.6 formatter config file and formatted the codebase 3 years ago
.gitignore add ex_docs 5 years ago
.travis.yml Update minimum Elixir version requirement to 1.3.0 4 years ago
LICENSE Initial commit 5 years ago Updated README: minor grammar improvements as well as section for contributing 3 years ago
mix.exs Remove HTTPoison application 8 months ago
mix.lock Remove HTTPoison application 8 months ago


Build Status Readability version Deps Status

Readability is a tool for extracting and curating the primary readable content of a webpage.
Check out The Documentation for full and detailed guides


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

  1. Add readability to your list of dependencies in mix.exs:
def deps do
  [{:readability, "~> 0.9"}]
  1. Ensure readability is started before your application:
def application do
  [applications: [:readability]]

Note: Readability requires Elixir 1.3 or higher.



Just pass a url

url = ""
summary = Readability.summarize(url)

#=> "Why I’m betting on Elixir"

#=> ["Ken Mazaika"]

# <div><div><p id=\"3476\"><strong><em>Background: </em></strong><em>I’ve spent...
# ...
# ...button!</em></h3></div></div>

# Background: I’ve spent the past 6 years building web applications in Ruby and.....
# ...
# ... value in this article, it would mean a lot to me if you hit the recommend button!

From raw html

### Extract the title.

### Extract authors.

### Extract the primary content with transformed html.
|> Readability.article
|> Readability.readable_html

### Extract only text from the primary content.
|> Readability.article
|> Readability.readable_text

### you can extract the primary images with Floki
|> Readability.article
|> Floki.find("img")
|> Floki.attribute("src")


If the result is different from your expectations, you can add options to customize it.


url = ""
summary = Readability.summarize(url, [clean_conditionally: false])
  • min_text_length \\ 25
  • remove_unlikely_candidates \\ true
  • weight_classes \\ true
  • clean_conditionally \\ true
  • retry_length \\ 250

You can find other algorithm and regex options in readability.ex


To run the test suite:

$ mix test


Contributions are welcome!

Check out the main features milestone and features of related projects below


  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

  • readability.js is a standalone version of the readability library used for Firefox Reader View.
  • newspaper is an advanced news extraction, article extraction, and content curation library for Python.
  • ruby-readability is a tool for extracting the primary readable content of a webpage.


This code is under the Apache License 2.0. See