mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-14 04:13:20 +00:00
[ie/generic] Fix direct video link extensions (#10468)
Fixes regression in the generic extractor due in 5ce582448e
Closes #10459
Authored by: bashonly
This commit is contained in:
parent
16da8ef993
commit
b9afb99e7c
|
@ -43,6 +43,7 @@
|
||||||
xpath_text,
|
xpath_text,
|
||||||
xpath_with_ns,
|
xpath_with_ns,
|
||||||
)
|
)
|
||||||
|
from ..utils._utils import _UnsafeExtensionError
|
||||||
|
|
||||||
|
|
||||||
class GenericIE(InfoExtractor):
|
class GenericIE(InfoExtractor):
|
||||||
|
@ -2446,9 +2447,13 @@ def _real_extract(self, url):
|
||||||
if not is_html(first_bytes):
|
if not is_html(first_bytes):
|
||||||
self.report_warning(
|
self.report_warning(
|
||||||
'URL could be a direct video link, returning it as such.')
|
'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({
|
info_dict.update({
|
||||||
'direct': True,
|
'direct': True,
|
||||||
'url': url,
|
'url': url,
|
||||||
|
'ext': ext,
|
||||||
})
|
})
|
||||||
return info_dict
|
return info_dict
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue