aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/extractor/common.py
diff options
context:
space:
mode:
authorsepro <sepro@sepr0.com>2024-11-04 01:33:21 +0100
committerGitHub <noreply@github.com>2024-11-04 01:33:21 +0100
commit197d0b03b6a3c8fe4fa5ace630eeffec629bf72c (patch)
tree577bda6784f8c1dbd9bcdf5e3a524a3c3c650f75 /yt_dlp/extractor/common.py
parentb03267bf0675eeb8df5baf1daac7cf67840c91a5 (diff)
[cleanup] Misc (#11347)
Closes #11361 Authored by: avagordon01, bashonly, grqz, Grub4K, seproDev Co-authored-by: Ava Gordon <avagordon01@gmail.com> Co-authored-by: bashonly <bashonly@protonmail.com> Co-authored-by: N/Ame <173015200+grqz@users.noreply.github.com> Co-authored-by: Simon Sawicki <contact@grub4k.xyz>
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r--yt_dlp/extractor/common.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index 7e6e6227d..01915acf2 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -1578,7 +1578,9 @@ class InfoExtractor:
if default is not NO_DEFAULT:
fatal = False
for mobj in re.finditer(JSON_LD_RE, html):
- json_ld_item = self._parse_json(mobj.group('json_ld'), video_id, fatal=fatal)
+ json_ld_item = self._parse_json(
+ mobj.group('json_ld'), video_id, fatal=fatal,
+ errnote=False if default is not NO_DEFAULT else None)
for json_ld in variadic(json_ld_item):
if isinstance(json_ld, dict):
yield json_ld