0.0
No commit activity in last 3 years
No release in over 3 years
A simple library for efficiently previewing links.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0.3.2
>= 0.7.3
>= 2.9.0
>= 2.6.0

Runtime

>= 2.3.0
>= 0.8.0
>= 1.5.0
>= 1.16.0
>= 1.5.0
>= 2.0.0
 Project Readme

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