aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authoraeph6Ee0 <aeph6Ee0@users.noreply.github.com>2018-04-07 22:09:42 +0200
committerSergey M <dstftw@gmail.com>2018-04-08 03:09:42 +0700
commit66b686727b198a6b14ddcbcfdcbaadd5b203362f (patch)
treefb41aac575c0b5bf7eed72958c566adae5b5e375 /youtube_dl
parent717ea4e14e59bded0c2fb20e84b6513d82644b43 (diff)
[extractor/common] Relax JSON-LD context check (closes #16006)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 890232586..59b9d3739 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 isinstance(e.get('@context'), compat_str) and 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