scottmac / opengraph

Helper class for accessing the OpenGraph Protocol
463 stars 151 forks source link

Added to retrieve using value attribute, fallback. #6

Closed AramZS closed 11 years ago

AramZS commented 12 years ago

Added an extra if loop to retrieve description values from sites like New York Times who have malformed it by using value instead of content. See http://www.nytimes.com/2012/06/13/world/middleeast/violence-in-syria-continues-as-protesters-killed.html for an example of this bad code.

Also adapted code from https://github.com/bashofmann to create an easy fallback from pages without og tags to pull the title and description meta tags instead.