mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 02:25:11 +00:00
[canalc2] Improve rtmp extraction
This commit is contained in:
parent
b0f001a6cb
commit
6682049dee
1 changed files with 3 additions and 1 deletions
|
@ -31,10 +31,12 @@ def _real_extract(self, url):
|
||||||
webpage, 'video_url')
|
webpage, 'video_url')
|
||||||
formats = [{'url': video_url}]
|
formats = [{'url': video_url}]
|
||||||
if video_url.startswith('rtmp://'):
|
if video_url.startswith('rtmp://'):
|
||||||
rtmp = re.search(r'^(?P<url>rtmp://[^/]+/(?P<app>.+))/(?P<play_path>mp4:.+)$', video_url)
|
rtmp = re.search(r'^(?P<url>rtmp://[^/]+/(?P<app>.+/))(?P<play_path>mp4:.+)$', video_url)
|
||||||
formats[0].update({
|
formats[0].update({
|
||||||
|
'url': rtmp.group('url'),
|
||||||
'app': rtmp.group('app'),
|
'app': rtmp.group('app'),
|
||||||
'play_path': rtmp.group('play_path'),
|
'play_path': rtmp.group('play_path'),
|
||||||
|
'page_url': url,
|
||||||
})
|
})
|
||||||
|
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
|
|
Loading…
Reference in a new issue