{"id":15696094,"url":"https://github.com/ghostdogpr/readability4s","last_synced_at":"2025-05-08T22:27:45.698Z","repository":{"id":50504465,"uuid":"105975100","full_name":"ghostdogpr/readability4s","owner":"ghostdogpr","description":"Scala library to extract relevant content from an article HTML","archived":false,"fork":false,"pushed_at":"2018-06-20T07:57:50.000Z","size":32,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T18:51:43.653Z","etag":null,"topics":["article-extracting","readability","scala"],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/ghostdogpr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-06T06:47:47.000Z","updated_at":"2023-03-02T17:15:23.000Z","dependencies_parsed_at":"2022-08-02T15:45:23.959Z","dependency_job_id":null,"html_url":"https://github.com/ghostdogpr/readability4s","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdogpr%2Freadability4s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdogpr%2Freadability4s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdogpr%2Freadability4s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdogpr%2Freadability4s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostdogpr","download_url":"https://codeload.github.com/ghostdogpr/readability4s/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253156939,"owners_count":21863028,"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","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":["article-extracting","readability","scala"],"created_at":"2024-10-03T19:07:21.212Z","updated_at":"2025-05-08T22:27:45.642Z","avatar_url":"https://github.com/ghostdogpr.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# readability4s [![Build Status](https://travis-ci.org/ghostdogpr/readability4s.svg?branch=master)](https://travis-ci.org/ghostdogpr/readability4s) [![License](http://img.shields.io/:license-Apache%202-red.svg)](http://www.apache.org/licenses/LICENSE-2.0.txt)\nA Scala library to extract content from an article HTML: title, full text, favicon, image, etc.\n\nThis project is a scala port of Mozilla's [Readability.js](https://github.com/mozilla/readability) with a few tweaks and improvements.\nScala version is 2.12.\n\n## Usage\n\nImport the project with Maven as follows:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.ghostdogpr\u003c/groupId\u003e\n  \u003cartifactId\u003ereadability4s\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.9\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nTo parse a document, you must create a new `Readability` object from a URI string and an HTML string, and then call `parse()`. Here's an example:\n\n```scala\nval article = Readability(url, htmlString).parse()\n```\n\nIt returns an `Option[Article]`.\nIt is either `None` when the article could not be processed, or an `Article` with the following properties:\n\n* `uri`: original URI string that was passed to constructor\n* `title`: article title\n* `byline`: author metadata\n* `content`: HTML string of processed article content\n* `textContent`: text of processed article content\n* `length`: length of article, in characters\n* `excerpt`: article description, or short excerpt from content\n* `faviconUrl`: URL of the favicon image\n* `imageUrl`: URL of an image representing the article","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdogpr%2Freadability4s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostdogpr%2Freadability4s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdogpr%2Freadability4s/lists"}