0.0
No commit activity in last 3 years
No release in over 3 years
Reads Twitter and Open Graph metadata from a given URL.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.5, >= 0.5.3
 Project Readme

Introducing the OgExtractor gem

require 'ogextractor'

url = 'https://www.bbc.co.uk/news/uk-politics-56605598'
oge = OgExtractor.new(url)

oge.title #=> "Coronavirus: Dozens of MPs criticise 'divisive...
oge.description #=> "Ministers are accused of "creeping a...
oge.type  #=> "article" 
oge.image #=> "https://ichef.bbci.co.uk/news/1024/branded_news...
oge.url   #=> "https://www.bbc.com/news/uk-politics-56605598" 

oge.to_h

output:

{:card=>"summary_large_image",
 :title=>"Coronavirus: Dozens of MPs criticise 'divisive' Covid passports",
 :img=>"https://ichef.bbci.co.uk/news/1024/branded_news/BB4F/production/_117815974_063818791-1.jpg",
 :desc=>
  "Ministers are accused of "creeping authoritarianism" amid reports that the passports will be trialled.",
 :url=>"https://www.bbc.com/news/uk-politics-56605598"} 

Resources

ogextractor opengraph twitter metadata socialmedia parser extractor