Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (22 sloc) 622 Bytes

ExtractContent

ExtractContent for Ruby 1.9

Installation

Install bundler.

gem install bundler
bundle init
vi Gemfile

Add the following line to Gemfile.

gem 'extractcontent', :git => 'https://github.com/mono0x/extractcontent.git'

Install the gem.

bundle install

Usage

# coding: utf-8

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.