{"id":13508279,"url":"https://github.com/keepcosmos/readability","last_synced_at":"2025-10-21T18:54:30.828Z","repository":{"id":57541053,"uuid":"56316387","full_name":"keepcosmos/readability","owner":"keepcosmos","description":"Readability is Elixir library for extracting and curating articles.","archived":false,"fork":false,"pushed_at":"2024-11-14T17:57:14.000Z","size":705,"stargazers_count":279,"open_issues_count":7,"forks_count":59,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-21T18:54:25.894Z","etag":null,"topics":["elixir","hacktoberfest","html","parser","readability","webpage"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keepcosmos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-15T11:50:50.000Z","updated_at":"2025-09-05T16:33:20.000Z","dependencies_parsed_at":"2024-01-31T07:07:31.089Z","dependency_job_id":"a952a648-3873-4b8a-bf86-78ae93176e4e","html_url":"https://github.com/keepcosmos/readability","commit_stats":{"total_commits":69,"total_committers":15,"mean_commits":4.6,"dds":0.4782608695652174,"last_synced_commit":"898c79cc313309b042cba2bef11f7ea5612bc88a"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/keepcosmos/readability","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keepcosmos%2Freadability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keepcosmos%2Freadability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keepcosmos%2Freadability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keepcosmos%2Freadability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keepcosmos","download_url":"https://codeload.github.com/keepcosmos/readability/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keepcosmos%2Freadability/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280317282,"owners_count":26309997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","hacktoberfest","html","parser","readability","webpage"],"created_at":"2024-08-01T02:00:50.770Z","updated_at":"2025-10-21T18:54:30.806Z","avatar_url":"https://github.com/keepcosmos.png","language":"Elixir","readme":"# Readability\n\n[![CI](https://github.com/keepcosmos/readability/actions/workflows/elixir.yml/badge.svg)](https://github.com/keepcosmos/readability/actions/workflows/elixir.yml)\n[![Module Version](https://img.shields.io/hexpm/v/readability.svg)](https://hex.pm/packages/readability)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/readability/)\n[![Total Download](https://img.shields.io/hexpm/dt/readability.svg)](https://hex.pm/packages/readability)\n[![License](https://img.shields.io/hexpm/l/readability.svg)](https://github.com/keepcosmos/readability/blob/master/LICENSE.md)\n[![Coverage Status](https://coveralls.io/repos/github/keepcosmos/readability/badge.svg?branch=master)](https://coveralls.io/github/keepcosmos/readability?branch=master)\n\nReadability is a tool for extracting and curating the primary readable content of a webpage.\n\n## Installation\n\nThe package can be installed as:\n\nAdd `:readability` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:readability, \"~\u003e 0.12\"}\n  ]\nend\n```\n\nAfter that, run mix deps.get.\n\nNote: Readability requires Elixir 1.10 or higher.\n\n## Usage\n\n### Examples\n\n#### Just pass a url\n\n```elixir\nurl = \"https://medium.com/@kenmazaika/why-im-betting-on-elixir-7c8f847b58\"\nsummary = Readability.summarize(url)\n\nsummary.title\n#=\u003e \"Why I’m betting on Elixir\"\n\nsummary.published_at\n#=\u003e ~U[2015-02-23 16:53:27.006Z]\n\nsummary.authors\n#=\u003e [\"Ken Mazaika\"]\n\nsummary.article_html\n#=\u003e\n# \u003cdiv\u003e\u003cdiv\u003e\u003cp id=\\\"3476\\\"\u003e\u003cstrong\u003e\u003cem\u003eBackground: \u003c/em\u003e\u003c/strong\u003e\u003cem\u003eI’ve spent...\n# ...\n# ...button!\u003c/em\u003e\u003c/h3\u003e\u003c/div\u003e\u003c/div\u003e\n\nsummary.article_text\n#=\u003e\n# Background: I’ve spent the past 6 years building web applications in Ruby and.....\n# ...\n# ... value in this article, it would mean a lot to me if you hit the recommend button!\n```\n\n#### From raw html\n\n```elixir\n### Extract the title.\nReadability.title(html)\n\n### Extract the published at\nReadability.published_at(html)\n\n### Extract authors.\nReadability.authors(html)\n\n### Extract the primary content with transformed html.\nhtml\n|\u003e Readability.article\n|\u003e Readability.readable_html\n\n### Extract only text from the primary content.\nhtml\n|\u003e Readability.article\n|\u003e Readability.readable_text\n\n### you can extract the primary images with Floki\nhtml\n|\u003e Readability.article\n|\u003e Floki.find(\"img\")\n|\u003e Floki.attribute(\"src\")\n```\n\n### Options\n\nIf the result is different from your expectations, you can add options to customize it.\n\n#### Example\n\n```elixir\nurl = \"https://medium.com/@kenmazaika/why-im-betting-on-elixir-7c8f847b58\"\nsummary = Readability.summarize(url, [clean_conditionally: false])\n```\n\n- `:min_text_length` \\\\\\\\ 25\n- `:remove_unlikely_candidates` \\\\\\\\ true\n- `:weight_classes` \\\\\\\\ true\n- `:clean_conditionally` \\\\\\\\ true\n- `:retry_length` \\\\\\\\ 250\n\n**You can find other algorithm and regex options in `readability.ex`**\n\n## Test\n\nTo run the test suite:\n\n    $ mix test\n\n## Todo\n\n- [x] Extract authors\n- [x] More configurable\n- [x] Summarize function\n- [ ] Convert relative paths into absolute paths of `img#src` and `a#href`\n\n## Contributions are welcome!\n\nCheck out [the main features milestone](https://github.com/keepcosmos/readability/milestones) and features of related projects below\n\n**Contributing**\n\n1. **Fork** the repo on GitHub\n2. **Clone** the project to your own machine\n3. **Commit** changes to your own branch\n4. **Push** your work back up to your fork\n5. Submit a **Pull request** so that we can review your changes\n\nNOTE: Be sure to merge the latest from \"upstream\" before making a pull request!\n\n## Related and Inspired Projects\n\n- [readability.js](https://github.com/mozilla/readability) is a standalone version of the readability library used for Firefox Reader View.\n- [newspaper](https://github.com/codelucas/newspaper) is an advanced news extraction, article extraction, and content curation library for Python.\n- [ruby-readability](https://github.com/cantino/ruby-readability) is a tool for extracting the primary readable content of a webpage.\n\n## Copyright and License\n\nCopyright (c) 2016 Jaehyun Shin\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","funding_links":[],"categories":["HTML","XML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeepcosmos%2Freadability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeepcosmos%2Freadability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeepcosmos%2Freadability/lists"}