diff --git a/lib/link_preview/parsers/opengraph.ex b/lib/link_preview/parsers/opengraph.ex index 4db649f..655423e 100644 --- a/lib/link_preview/parsers/opengraph.ex +++ b/lib/link_preview/parsers/opengraph.ex @@ -65,7 +65,7 @@ defmodule LinkPreview.Parsers.Opengraph do images = body |> Floki.parse() - |> Floki.find("meta[property^=\"og:image\"]") + |> Floki.find("meta[property=\"og:image\"]") |> Floki.attribute("content") |> Enum.map(&String.trim(&1)) |> maybe_force_absolute_url(page) diff --git a/test/support/fixtures/opengraph_example.html b/test/support/fixtures/opengraph_example.html index ac33b74..3cb3d82 100644 --- a/test/support/fixtures/opengraph_example.html +++ b/test/support/fixtures/opengraph_example.html @@ -4,9 +4,15 @@ + + + + + + - \ No newline at end of file +