From a6a5d31c6dfeaf5c2e7c115eab931a2265a62411 Mon Sep 17 00:00:00 2001 From: doe1080 <98906116+doe1080@users.noreply.github.com> Date: Sun, 8 Jun 2025 15:05:59 +0900 Subject: [PATCH] Apply suggestions --- yt_dlp/extractor/dw.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yt_dlp/extractor/dw.py b/yt_dlp/extractor/dw.py index 2d92f94f8..6a80f838e 100644 --- a/yt_dlp/extractor/dw.py +++ b/yt_dlp/extractor/dw.py @@ -104,20 +104,20 @@ def _entries(self, url, graph_api, media_type): for dct in traverse_obj(graph_api, ('audios', lambda _, v: v['mp3Src'])): mp3_url = traverse_obj(dct, 'mp3Src', {url_or_none}) - yield from [{ + yield { 'id': url_basename(mp3_url).removesuffix('.mp3'), 'ext': 'mp3', 'title': dct.get('title'), 'url': mp3_url, 'vcodec': 'none', - }] + } def _real_extract(self, url): lang, media_type, media_id = self._match_valid_url(url).group('lang', 'type', 'id') webpage = self._download_webpage(url, media_id) app_state = self._search_json( - r'window\.__APP_STATE__\s*=\s*', webpage, 'app state', media_id, default={}) + r'window\.__APP_STATE__\s*=', webpage, 'app state', media_id, default={}) if not app_state: title = self._html_search_meta('twitter:title', webpage) pattern = re.compile(r']+src\s*=\s*(["\'])(?P.+?)\1')