otiai10 / opengraph

Open Graph Parser for Go
https://pkg.go.dev/github.com/otiai10/opengraph
MIT License
65 stars 13 forks source link

Support "og:image:url" property #8

Closed go-u closed 4 years ago

go-u commented 4 years ago

Hi,

I used this package to https://bosyu.me/ But fail to get "og:image", because this site using "og:image:url" as meta property.

Then I read doc about ogp, and found this,

The og:image property has some optional structured properties:

  • og:image:url - Identical to og:image.

For example, this site seems to support "ogp:image:url".

So I updated code to support "og: image: url". What do you think ?

codecov-io commented 4 years ago

Codecov Report

Merging #8 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #8   +/-   ##
=======================================
  Coverage   82.89%   82.89%           
=======================================
  Files           4        4           
  Lines         152      152           
=======================================
  Hits          126      126           
  Misses         17       17           
  Partials        9        9
Impacted Files Coverage Δ
tag_meta.go 83.33% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 373352b...8cbb293. Read the comment docs.

otiai10 commented 4 years ago

Makes complete sense. Thanks a lot ;)