parser icon indicating copy to clipboard operation
parser copied to clipboard

`og:` tags not properly parsed

Open TLadd opened this issue 5 years ago • 0 comments

  • Platform: Mac OS X
  • Mercury Parser Version: 2.2.0
  • Node Version (if a Node bug): 14

Expected Behavior

og:title, og:description, og:image etc values ought to be used.

Current Behavior

These values are ignored because the generic extractors use extractFromMeta which ends up using selectors like meta[name="og:image"] but it really should be meta[property="og:image"].

Steps to Reproduce

Run MercuryParser.parse on a page that supplies og: tags and doesn't supply identical values via other means. Observe that the og: values are not present in the result.

Possible Solution

Either fix the extractFromMeta utility to special case og: tags or stop using it for these tags.

TLadd avatar Nov 30 '20 08:11 TLadd