From eaeeef9c1d1bedb76fea953c332ef84d53bffe2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Fri, 2 Dec 2022 05:21:10 +0800 Subject: update from upstream --- hypervideo_dl/extractor/zype.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'hypervideo_dl/extractor/zype.py') diff --git a/hypervideo_dl/extractor/zype.py b/hypervideo_dl/extractor/zype.py index 7663cb3..8cf9945 100644 --- a/hypervideo_dl/extractor/zype.py +++ b/hypervideo_dl/extractor/zype.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import re from .common import InfoExtractor @@ -18,6 +15,7 @@ class ZypeIE(InfoExtractor): _ID_RE = r'[\da-fA-F]+' _COMMON_RE = r'//player\.zype\.com/embed/%s\.(?:js|json|html)\?.*?(?:access_token|(?:ap[ip]|player)_key)=' _VALID_URL = r'https?:%s[^&]+' % (_COMMON_RE % ('(?P%s)' % _ID_RE)) + _EMBED_REGEX = [fr']+\bsrc=(["\'])(?P(?:https?:)?{_COMMON_RE % _ID_RE}.+?)\1'] _TEST = { 'url': 'https://player.zype.com/embed/5b400b834b32992a310622b9.js?api_key=jZ9GUhRmxcPvX7M3SlfejB6Hle9jyHTdk2jVxG7wOHPLODgncEKVdPYBhuz9iWXQ&autoplay=false&controls=true&da=false', 'md5': 'eaee31d474c76a955bdaba02a505c595', @@ -32,14 +30,6 @@ class ZypeIE(InfoExtractor): }, } - @staticmethod - def _extract_urls(webpage): - return [ - mobj.group('url') - for mobj in re.finditer( - r']+\bsrc=(["\'])(?P(?:https?:)?%s.+?)\1' % (ZypeIE._COMMON_RE % ZypeIE._ID_RE), - webpage)] - def _real_extract(self, url): video_id = self._match_id(url) @@ -107,7 +97,6 @@ class ZypeIE(InfoExtractor): if text_tracks: text_tracks = self._parse_json( text_tracks, video_id, js_to_json, False) - self._sort_formats(formats) if text_tracks: for text_track in text_tracks: -- cgit v1.2.3