From ad6ee6fdd2548cc153d85c74675a941699437a25 Mon Sep 17 00:00:00 2001 From: Bart Broere Date: Sat, 21 Sep 2024 21:58:53 +0200 Subject: [PATCH] Commit two suggestions from the PR Co-authored-by: dirkf --- youtube_dl/extractor/npo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py index 4dbab16ab..bfa96e6a7 100644 --- a/youtube_dl/extractor/npo.py +++ b/youtube_dl/extractor/npo.py @@ -95,7 +95,7 @@ class NPOIE(InfoExtractor): }, fatal=False, ) - stream_url = stream_link.get('stream', {}).get('streamURL') + stream_url = traverse_obj(stream_link, ('stream', 'streamURL')) formats.extend(self._extract_mpd_formats(stream_url, slug, mpd_id='dash', fatal=False)) return formats @@ -160,7 +160,7 @@ class ONIE(NPOIE): def _real_extract(self, url): video_id = url.rstrip('/').split('/')[-1] - page, _ = self._download_webpage_handle(url, video_id) + page = self._download_webpage(url, video_id) results = re.findall("page: '(.+)'", page) formats = [] for result in results: