1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-06-26 13:49:38 +00:00
This commit is contained in:
Deleted user 2024-06-14 10:21:20 +00:00 committed by GitHub
commit 906b5e3775
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1337,10 +1337,12 @@ class InfoExtractor(object):
# At the same time `default` may be passed that assumes `fatal=False`
# for _search_regex. Let's simulate the same behavior here as well.
fatal = kwargs.get('fatal', True) if default == NO_DEFAULT else False
# Give the caller extractor the opportunity to fix malformed JSON-LD.
transform_source = kwargs.get('transform_source', None)
json_ld = []
for mobj in json_ld_list:
json_ld_item = self._parse_json(
mobj.group('json_ld'), video_id, fatal=fatal)
mobj.group('json_ld'), video_id, transform_source=transform_source, fatal=fatal)
if not json_ld_item:
continue
if isinstance(json_ld_item, dict):