Need help with go-readability?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

mauidude
130 Stars 31 Forks 15 Commits 4 Opened issues

Description

A Go implementation of the readability algorithm by arc90 labs

Services available

!
?

Need anything else?

Contributors list

# 358,325
HTML
Go
12 commits
# 260,893
HTML
Go
Shell
search-...
1 commit

go-readability

go-readability is library for extracting the main content off of an HTML page. This library implements the readability algorithm created by arc90 labs and was heavily inspired by https://github.com/cantino/ruby-readability.

Installation

go install github.com/mauidude/go-readability

CLI Tool

You can run readability via the command line to extract content from a single HTML file by running the following command:

$ readability path/to/file.html

For help with usage and options you can run the following:

$ readability --help

Example

import(
  "github.com/mauidude/go-readability"
)

...

doc, err := readability.NewDocument(html) if err != nil { // do something ... }

content := doc.Content() // do something with my content

Tests

To run tests

go test github.com/mauidude/go-readability

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.