JSFiddle - React, Tailwind, and code Playground
JavaScript
var url = "http://www.ebay.com/itm/Microsoft-Surface-Pro-3-12-Tablet-256GB-SSD-Intel-Core-i7-Haswell-8GB-RAM-/281656969697";
$.getJSON("//query.yahooapis.com/v1/public/yql?" +
"q=SELECT%20*%20FROM%20html%20WHERE%20url=%27" + encodeURIComponent(url) +
"%27%20AND%20xpath=%27descendant-or-self::meta%27&format=json&callback=?",
function (data) {
console.log(data);
var res = $.grep(data.query.results.meta, function (image, key) {
return image.hasOwnProperty("property") && image.property === "og:image"
});
if (res.length > 0) {
console.log(res[0].property);
$("body").append(res[0].content);
} else {
console.log("og:image not found")
}
})