projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
717ea4e
)
[extractor/common] Relax JSON-LD context check (closes #16006)
author
aeph6Ee0
<aeph6Ee0@users.noreply.github.com>
Sat, 7 Apr 2018 20:09:42 +0000
(22:09 +0200)
committer
Sergey M
<dstftw@gmail.com>
Sat, 7 Apr 2018 20:09:42 +0000
(
03:09
+0700)
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index 890232586333866b64f1b3d2bdba6231535854e9..59b9d373951331ef5c02bb6ed80d0f28bfaf4c8f 100644
(file)
--- 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