Skip to content

sporkmonger/href-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HREF Preview

Homepage
https://github.com/sporkmonger/href-preview
Author
Bob Aman
Copyright
Copyright © 2014 Bob Aman
License
Apache 2.0

Gittip Donate

Description

A comprehensive library for efficiently previewing links.

Features

Capable of detecting:

  • OpenGraph metadata
  • Twitter metadata
  • Microdata metadata
  • Assorted microformat metadata
  • RDFa metadata
  • rel="canonical" links

Automatically follows redirects and shortened URLs.

Example Usage

require 'href_preview'
p = HRefPreview.open('http://nyti.ms/1c1zNtX')
p.title
# => "A Successor to Sagan Reboots ‘Cosmos’"
p.description
# =>
p.article_html
p.article_text
p.published
p.canonical_uri

Install

  • gem install href-preview

About

A comprehensive library for efficiently previewing links.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages