From 1951bc12dc0ad061093f53283820d434ecec443d Mon Sep 17 00:00:00 2001 From: aeph6Ee0 Date: Thu, 5 Apr 2018 12:47:24 +0200 Subject: [PATCH] Make JSON-LD @context parsing more robust --- youtube_dl/extractor/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 890232586..3fc6e21da 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -1025,7 +1025,7 @@ class InfoExtractor(object): }) for e in json_ld: - if e.get('@context') == 'http://schema.org': + if re.match(r'^https?://schema.org/?$', e.get('@context')): item_type = e.get('@type') if expected_type is not None and expected_type != item_type: return info