diff options
author | pukkandan <pukkandan@gmail.com> | 2021-02-04 13:26:01 +0530 |
---|---|---|
committer | pukkandan <pukkandan@gmail.com> | 2021-02-04 13:26:22 +0530 |
commit | 2181983a0c97c6fd3bb681c86d64699051061c1c (patch) | |
tree | 3b352353ae60cf8a889cccf89cfffc60d4db5f0d /youtube_dlc/extractor/zype.py | |
parent | e29663c644a65846125f5792be52dc27feb68297 (diff) | |
download | hypervideo-pre-2181983a0c97c6fd3bb681c86d64699051061c1c.tar.lz hypervideo-pre-2181983a0c97c6fd3bb681c86d64699051061c1c.tar.xz hypervideo-pre-2181983a0c97c6fd3bb681c86d64699051061c1c.zip |
Update to ytdl-2021.02.04.1 except youtube
Diffstat (limited to 'youtube_dlc/extractor/zype.py')
-rw-r--r-- | youtube_dlc/extractor/zype.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/youtube_dlc/extractor/zype.py b/youtube_dlc/extractor/zype.py index 5288f40d8..f20f953cb 100644 --- a/youtube_dlc/extractor/zype.py +++ b/youtube_dlc/extractor/zype.py @@ -87,11 +87,16 @@ class ZypeIE(InfoExtractor): r'(["\'])(?P<url>(?:(?!\1).)+\.m3u8(?:(?!\1).)*)\1', 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'] + source = self._search_regex( + r'(?s)sources\s*:\s*\[\s*({.+?})\s*\]', body, 'source') + + def get_attr(key): + return self._search_regex( + r'\b%s\s*:\s*([\'"])(?P<val>(?:(?!\1).)+)\1' % key, + source, key, group='val') + + if get_attr('integration') == 'verizon-media': + m3u8_url = 'https://content.uplynk.com/%s.m3u8' % get_attr('id') formats = self._extract_m3u8_formats( m3u8_url, video_id, 'mp4', 'm3u8_native', m3u8_id='hls') text_tracks = self._search_regex( |