diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 38daef0a0..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 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