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/redtube.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'hypervideo_dl/extractor/redtube.py') diff --git a/hypervideo_dl/extractor/redtube.py b/hypervideo_dl/extractor/redtube.py index 7fee54f..49076cc 100644 --- a/hypervideo_dl/extractor/redtube.py +++ b/hypervideo_dl/extractor/redtube.py @@ -1,7 +1,3 @@ -from __future__ import unicode_literals - -import re - from .common import InfoExtractor from ..utils import ( determine_ext, @@ -16,6 +12,7 @@ from ..utils import ( class RedTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:\w+\.)?redtube\.com/|embed\.redtube\.com/\?.*?\bid=)(?P[0-9]+)' + _EMBED_REGEX = [r']+?src=["\'](?P(?:https?:)?//embed\.redtube\.com/\?.*?\bid=\d+)'] _TESTS = [{ 'url': 'https://www.redtube.com/38864951', 'md5': '4fba70cbca3aefd25767ab4b523c9878', @@ -39,12 +36,6 @@ class RedTubeIE(InfoExtractor): 'only_matching': True, }] - @staticmethod - def _extract_urls(webpage): - return re.findall( - r']+?src=["\'](?P(?:https?:)?//embed\.redtube\.com/\?.*?\bid=\d+)', - webpage) - def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage( @@ -119,7 +110,6 @@ class RedTubeIE(InfoExtractor): video_url = self._html_search_regex( r'', webpage, 'video URL') formats.append({'url': video_url, 'ext': 'mp4'}) - self._sort_formats(formats) thumbnail = self._og_search_thumbnail(webpage) upload_date = unified_strdate(self._search_regex( -- cgit v1.2.3