Skip to content
MetaInformation - Simple gem for parsing meta information
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.ruby-version
Gemfile
LICENSE.txt
README.md
meta_information.gemspec

README.md

MetaInformation

Gem Version

Simple gem for parsing meta information from websites. It scan all meta-tags by name or property attributes.

Instalation

Add this line to your application's Gemfile:

gem 'meta_information'

Then run bundle install Or install it yourself as:

gem install meta_information

Usage

require 'pp'
meta = MetaInformation.get_meta('https://www.awesome_site.com/awesome_page')
pp meta
###
#{:succes=>"true",
# :error=>"",
# :all_meta=>
#  [{:type=>"name",
#    :name=>"viewport",
#    :property=>nil,
#    :content=>"width=device-width, initial-scale=1.0"},
#   {:type=>"name", :name=>"description", :property=>nil, :content=>"some description"},
#   {:type=>"name", :name=>"title", :property=>nil, :content=>"i am title"},
#   {:type=>"name", :name=>"og:title", :property=>nil, :content=>"some content"},
#   {:type=>"name", :name=>"og:description", :property=>nil, :content=>"some description"},
#   {:type=>"name",
#    :name=>"og:image",
#    :property=>nil,
#    :content=> "https://www.awesome_site.com/assets/awesome_picture.jpg"}]},
#   {:type=>"property", :name=>nil, :property=>"fb:app_id", :content=>"1234567890"},
###

License

MIT License.

You can’t perform that action at this time.