Skip to content

gregorym/boilerpipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A ruby wrapper for the Boilerpipe API.
Boilerpipe definition:

The boilerpipe library provides algorithms to detect and remove the surplus “clutter” (boilerplate, templates) around the main textual content of a web page.

For more information: http://code.google.com/p/boilerpipe/

Explication

The Boilerpipe module has only one method which is extract. Extract takes 2 parameters, first the url and second a hash.
The hash can have 3 options:

  • output => :html, :htmlFragment, :text, :json, :debug
  • extractor => :ArticleExtractor, :DefaultExtractor, :LargestContentExtractor, :KeepEverythingExtractor, :CanolaExtractor
  • api: => The api url

None of these options are mandatory. To find out more about these options checkout the Boilerpipe API http://boilerpipe-web.appspot.com/

Example

require "boilerpipe"
Boilerpipe.extract("http://techcrunch.com/2011/05/12/karma-is-a-bitch/", {:output => :json})

About

Ruby wrapper for the Boilerpipe API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages