mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-25 20:55:52 +01:00
[extractor/generic] Improve rtmp support (closes #11993)
This commit is contained in:
parent
7097bffba6
commit
b7a8c1bcfa
@ -29,6 +29,7 @@
|
|||||||
UnsupportedError,
|
UnsupportedError,
|
||||||
xpath_text,
|
xpath_text,
|
||||||
)
|
)
|
||||||
|
from .commonprotocols import RtmpIE
|
||||||
from .brightcove import (
|
from .brightcove import (
|
||||||
BrightcoveLegacyIE,
|
BrightcoveLegacyIE,
|
||||||
BrightcoveNewIE,
|
BrightcoveNewIE,
|
||||||
@ -2487,6 +2488,8 @@ def _playlist_from_matches(matches, getter=None, ie=None):
|
|||||||
def check_video(vurl):
|
def check_video(vurl):
|
||||||
if YoutubeIE.suitable(vurl):
|
if YoutubeIE.suitable(vurl):
|
||||||
return True
|
return True
|
||||||
|
if RtmpIE.suitable(vurl):
|
||||||
|
return True
|
||||||
vpath = compat_urlparse.urlparse(vurl).path
|
vpath = compat_urlparse.urlparse(vurl).path
|
||||||
vext = determine_ext(vpath)
|
vext = determine_ext(vpath)
|
||||||
return '.' in vpath and vext not in ('swf', 'png', 'jpg', 'srt', 'sbv', 'sub', 'vtt', 'ttml', 'js')
|
return '.' in vpath and vext not in ('swf', 'png', 'jpg', 'srt', 'sbv', 'sub', 'vtt', 'ttml', 'js')
|
||||||
@ -2584,6 +2587,10 @@ def filter_video(urls):
|
|||||||
entries.append(self.url_result(video_url, 'Youtube'))
|
entries.append(self.url_result(video_url, 'Youtube'))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if RtmpIE.suitable(video_url):
|
||||||
|
entries.append(self.url_result(video_url, RtmpIE.ie_key()))
|
||||||
|
continue
|
||||||
|
|
||||||
# here's a fun little line of code for you:
|
# here's a fun little line of code for you:
|
||||||
video_id = os.path.splitext(video_id)[0]
|
video_id = os.path.splitext(video_id)[0]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user