diff options
author | bashonly <88596187+bashonly@users.noreply.github.com> | 2024-07-14 13:57:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-14 18:57:07 +0000 |
commit | b9afb99e7c34d0eb15ddc6689cd7d20eebfda68e (patch) | |
tree | b7d4eb84e7f32f3d199e7897c5b87cb0e0ec2a42 | |
parent | 16da8ef9937ff76632dfef02e5062c5ba99c8ea2 (diff) |
[ie/generic] Fix direct video link extensions (#10468)
Fixes regression in the generic extractor due in 5ce582448ececb8d9c30c8c31f58330090ced03a
Closes #10459
Authored by: bashonly
-rw-r--r-- | yt_dlp/extractor/generic.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/yt_dlp/extractor/generic.py b/yt_dlp/extractor/generic.py index 3b8e1e957..04cffaa86 100644 --- a/yt_dlp/extractor/generic.py +++ b/yt_dlp/extractor/generic.py @@ -43,6 +43,7 @@ from ..utils import ( xpath_text, xpath_with_ns, ) +from ..utils._utils import _UnsafeExtensionError class GenericIE(InfoExtractor): @@ -2446,9 +2447,13 @@ class GenericIE(InfoExtractor): if not is_html(first_bytes): self.report_warning( 'URL could be a direct video link, returning it as such.') + ext = determine_ext(url) + if ext not in _UnsafeExtensionError.ALLOWED_EXTENSIONS: + ext = 'unknown_video' info_dict.update({ 'direct': True, 'url': url, + 'ext': ext, }) return info_dict |