Open Graph should use this syntax:
<meta property="og:title" content="This is the title" />
but some website use name
instead of property
(also stackoverflow, check it out this question html). And I've also seen other parameters, such as data-og
.
So, I'd like to select/filter an element with jQuert that contains og:title
as value instead of property
, because this:
$mypage.filter("meta[property='og:title']").attr("content");
won't work for example if I parser a stackoverflow page (which has meta name='og:title'
).
How can I do this in jQuery? Filter by "value-destination"? Tried with:
$mypage.filter("meta[*='og:title']").attr("content");
but it give to me fields that does not contains og:title