1
0
mirror of https://github.com/l1ving/youtube-dl synced 2026-05-29 06:19:48 +08:00

Check if '@context' value in JSON-LD is a compat_str

This commit is contained in:
aeph6Ee0
2018-04-07 21:41:09 +02:00
Unverified
parent f8ef225de4
commit 349daa9203
+1 -1
View File
@@ -1025,7 +1025,7 @@ class InfoExtractor(object):
})
for e in json_ld:
if isinstance(e.get('@context'), str) and re.match(r'^https?://schema.org/?$', e.get('@context')):
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