Skip to content

structured properties should be exposed as python dicts #2

@chason

Description

@chason

Structured OGP properties (i.e. image) should be represented with a similar structure in the class. For example:

<meta property="og:image" content="http://example.com/ogp.jpg" />
<meta property="og:image:secure_url" content="https://secure.example.com/ogp.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />
<meta property="og:image:alt" content="A shiny red apple with a bite taken out" />

Should probably look something like:

{
  "url": "http://example.com/ogp.jpg",
  "secure_url": "https://secure.example.com/ogp.jpg",
  "type": "image/jpeg",
  "width": 400,
  "height": 300,
  "alt": "A shiny red apple with a bite taken out"
}

Note that the image property is converted into url. This is because og:image and 'og:image:url` are synonyms in OGP.

The structure above and how it is presented in the OGP class are suggestions. If you have a more creative solution with significant benefits, feel free to try it out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions