From c39fd7b1ca3e81901aa28d36523fe698295e58d5 Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Thu, 19 Nov 2015 22:22:57 +0800 Subject: [PATCH] [UDNEmbed] Fix generic UDN pages Closes #7547 --- youtube_dl/extractor/generic.py | 2 +- youtube_dl/extractor/udn.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 51516a38a..b483eba65 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -1739,7 +1739,7 @@ class GenericIE(InfoExtractor): # Look for UDN embeds mobj = re.search( - r']+src="(?P%s)"' % UDNEmbedIE._VALID_URL, webpage) + r']+src="(?P%s)"' % UDNEmbedIE._PROTOCOL_RELATIVE_VALID_URL, webpage) if mobj is not None: return self.url_result( compat_urlparse.urljoin(url, mobj.group('url')), 'UDNEmbed') diff --git a/youtube_dl/extractor/udn.py b/youtube_dl/extractor/udn.py index 2151f8338..ee35b7227 100644 --- a/youtube_dl/extractor/udn.py +++ b/youtube_dl/extractor/udn.py @@ -12,7 +12,8 @@ from ..compat import compat_urlparse class UDNEmbedIE(InfoExtractor): IE_DESC = '聯合影音' - _VALID_URL = r'https?://video\.udn\.com/(?:embed|play)/news/(?P\d+)' + _PROTOCOL_RELATIVE_VALID_URL = r'//video\.udn\.com/(?:embed|play)/news/(?P\d+)' + _VALID_URL = r'https?:' + _PROTOCOL_RELATIVE_VALID_URL _TESTS = [{ 'url': 'http://video.udn.com/embed/news/300040', 'md5': 'de06b4c90b042c128395a88f0384817e', -- 2.39.5