From 4a07a455bbf7acf87550053bbba949c828e350ba Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 19 Jan 2024 08:49:15 -0800 Subject: [PATCH] [ie/GoPro] Fix extractor (#9019) Authored by: stilor --- yt_dlp/extractor/gopro.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/gopro.py b/yt_dlp/extractor/gopro.py index ae965374c..ec1595bc5 100644 --- a/yt_dlp/extractor/gopro.py +++ b/yt_dlp/extractor/gopro.py @@ -57,8 +57,8 @@ class GoProIE(InfoExtractor): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) - metadata = self._parse_json( - self._html_search_regex(r'window\.__reflectData\s*=\s*([^;]+)', webpage, 'metadata'), video_id) + metadata = self._search_json( + r'window\.__reflectData\s*=', webpage, 'metadata', video_id) video_info = metadata['collectionMedia'][0] media_data = self._download_json( @@ -99,7 +99,7 @@ class GoProIE(InfoExtractor): 'duration': int_or_none( video_info.get('source_duration')), 'artist': str_or_none( - video_info.get('music_track_artist')), + video_info.get('music_track_artist')) or None, 'track': str_or_none( - video_info.get('music_track_name')), + video_info.get('music_track_name')) or None, }