logo

youtube-dl

[mirror] Download/Watch videos from video hostersgit clone https://hacktivis.me/git/mirror/youtube-dl.git
commit: c0071885987b3737d2c586133007c61ab513a477
parent af93ecfd88d539cccea97f6cfc33b8cbe362a8ed
Author: Remita Amine <remitamine@gmail.com>
Date:   Sun, 27 Dec 2020 23:47:28 +0100

[zype] Add support for uplynk videos

Diffstat:

Myoutube_dl/extractor/zype.py8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/youtube_dl/extractor/zype.py b/youtube_dl/extractor/zype.py @@ -85,7 +85,13 @@ class ZypeIE(InfoExtractor): else: m3u8_url = self._search_regex( r'(["\'])(?P<url>(?:(?!\1).)+\.m3u8(?:(?!\1).)*)\1', - body, 'm3u8 url', group='url') + body, 'm3u8 url', group='url', default=None) + if not m3u8_url: + source = self._parse_json(self._search_regex( + r'(?s)sources\s*:\s*\[\s*({.+?})\s*\]', body, + 'source'), video_id, js_to_json) + if source.get('integration') == 'verizon-media': + m3u8_url = 'https://content.uplynk.com/%s.m3u8' % source['id'] formats = self._extract_m3u8_formats( m3u8_url, video_id, 'mp4', 'm3u8_native', m3u8_id='hls') text_tracks = self._search_regex(