ExtractContent for Ruby 1.9+
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
LICENSE
README.markdown
extractcontent.gemspec

README.markdown

ExtractContent

ExtractContent for Ruby 1.9+

Installation

Edit Gemfile.

$ vi Gemfile

Add a following line to Gemfile.

gem 'extractcontent', github: 'mono0x/extractcontent'

Install the gem.

$ bundle install

Usage

require 'bundler/setup'
require 'extractcontent'

html = ...
content, title = ExtractContent.analyse(html)

puts title
puts content

License

The BSD License

The original code was written by Nakatani Shuyo.