From ff54ac38cd7a1aebf093d076c25a4f731c614959 Mon Sep 17 00:00:00 2001 From: doe1080 <98906116+doe1080@users.noreply.github.com> Date: Wed, 16 Jul 2025 17:26:24 +0900 Subject: [PATCH] UDNEmbedIE --- yt_dlp/extractor/generic.py | 10 ---------- yt_dlp/extractor/udn.py | 18 +++++++++++++----- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/yt_dlp/extractor/generic.py b/yt_dlp/extractor/generic.py index 2172e2f96..4d56d46ad 100644 --- a/yt_dlp/extractor/generic.py +++ b/yt_dlp/extractor/generic.py @@ -1454,16 +1454,6 @@ class GenericIE(InfoExtractor): 'description': 'md5:117c212f64b25e3d95747e5276863f7d', }, 'skip': 'IE fix required; update _VALID_URL', - }, { - # 🔧108 - # UDNEmbedIE - 'url': 'https://video.udn.com/news/1308561', - 'info_dict': { - 'id': '300346', - 'ext': 'mp4', - 'title': '中一中男師變性 全校師生力挺', - }, - 'skip': 'IE fix required; embed detection', }, { # ✅124 # YoutubeIE diff --git a/yt_dlp/extractor/udn.py b/yt_dlp/extractor/udn.py index 9970e4ff5..716c4a6e6 100644 --- a/yt_dlp/extractor/udn.py +++ b/yt_dlp/extractor/udn.py @@ -22,11 +22,7 @@ class UDNEmbedIE(InfoExtractor): 'title': '生物老師男變女 全校挺"做自己"', 'thumbnail': r're:^https?://.*\.jpg$', }, - 'params': { - # m3u8 download - 'skip_download': True, - }, - 'expected_warnings': ['Failed to parse JSON Expecting value'], + 'skip': 'Invalid URL', }, { 'url': 'https://video.udn.com/embed/news/300040', 'only_matching': True, @@ -35,6 +31,18 @@ class UDNEmbedIE(InfoExtractor): 'url': 'https://video.udn.com/play/news/303776', 'only_matching': True, }] + _WEBPAGE_TESTS = [{ + 'url': 'https://video.udn.com/news/1308561', + 'info_dict': { + 'id': '1308561', + 'ext': 'mp4', + 'title': '影/丹娜絲颱風暴風圈擴大 上午8:30發布海警', + 'thumbnail': r're:https?://cdn\.udn\.com/img/.+\.jpg', + }, + 'expected_warnings': ['Failed to parse JSON'], + 'params': {'skip_download': 'm3u8'}, + 'skip': 'IE fix required; update _VALID_URL', + }] def _real_extract(self, url): video_id = self._match_id(url)