aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/generic.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-02-06 23:23:40 +0700
committerSergey M․ <dstftw@gmail.com>2017-02-06 23:23:40 +0700
commitb7a8c1bcfaccb797609ea763a1aa3140148bcddc (patch)
tree77285546b8d805c1b522f5c154e74c4195ff5291 /youtube_dl/extractor/generic.py
parent7097bffba6769302d9aef7e839baf4c6f30de066 (diff)
[extractor/generic] Improve rtmp support (closes #11993)
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r--youtube_dl/extractor/generic.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index 4156cf27d..1fb0e0673 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -29,6 +29,7 @@ from ..utils import (
UnsupportedError,
xpath_text,
)
+from .commonprotocols import RtmpIE
from .brightcove import (
BrightcoveLegacyIE,
BrightcoveNewIE,
@@ -2487,6 +2488,8 @@ class GenericIE(InfoExtractor):
def check_video(vurl):
if YoutubeIE.suitable(vurl):
return True
+ if RtmpIE.suitable(vurl):
+ return True
vpath = compat_urlparse.urlparse(vurl).path
vext = determine_ext(vpath)
return '.' in vpath and vext not in ('swf', 'png', 'jpg', 'srt', 'sbv', 'sub', 'vtt', 'ttml', 'js')
@@ -2584,6 +2587,10 @@ class GenericIE(InfoExtractor):
entries.append(self.url_result(video_url, 'Youtube'))
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:
video_id = os.path.splitext(video_id)[0]