]> jfr.im git - yt-dlp.git/commit - test/test_InfoExtractor.py
[extractor] Support default implicit graph in JSON-LD (#1983)
authorZenon Mousmoulas <redacted>
Thu, 16 Dec 2021 20:46:30 +0000 (22:46 +0200)
committerGitHub <redacted>
Thu, 16 Dec 2021 20:46:30 +0000 (02:16 +0530)
commitd5c3254889208a75d57c74868a7e7ce62be6b636
tree9c9ee121c83f50417124aebda732a39af06054c8
parentfed13096518de5ba6f2125a2a93df2113214d5db
[extractor] Support default implicit graph in JSON-LD (#1983)

Original PR: https://github.com/ytdl-org/youtube-dl/pull/30229

Per W3C JSON-LD v1.1 ยง4.9 (non-normative ref):

    When a JSON-LD document's top-level structure is a map that contains
    no other keys than @graph and optionally @context (properties that
    are not mapped to an IRI or a keyword are ignored), @graph is
    considered to express the otherwise implicit default graph.

Authored by: zmousm
test/test_InfoExtractor.py
yt_dlp/extractor/common.py