Skip to content

Conversation

pvgenuchten
Copy link
Contributor

@pvgenuchten pvgenuchten commented Mar 28, 2025

this adds methods get_first and get_all to get elm or get list
and fixes some parse errors

schema.org has a 0-N cardinality for most of its properties, if the value is single, the actual value is returned, if it is multiple a list of elements is returned

These utility functions provide option to grab the first or all elements, while checking their type to be literal or list, get-all returns list, get-first returns literal

some samples:

either fetch the json-ld from the html or open it in https://validator.schema.org/

@pvgenuchten pvgenuchten force-pushed the improve-schema-org branch from b6ab6a0 to 4e02046 Compare May 23, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant