From 2638cab322d2baf984c9dca0dc29fcf9368cc51e Mon Sep 17 00:00:00 2001 From: Aaron Tan <70739609+aaron-tan@users.noreply.github.com> Date: Thu, 17 Aug 2023 14:04:58 +1000 Subject: [PATCH] [caffeine.tv] Refactor info extractor Refactor code to better reflect coding conventions --- youtube_dl/extractor/caffeine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/caffeine.py b/youtube_dl/extractor/caffeine.py index cd7b62c9e..ea773baf3 100644 --- a/youtube_dl/extractor/caffeine.py +++ b/youtube_dl/extractor/caffeine.py @@ -25,7 +25,7 @@ class CaffeineIE(InfoExtractor): def _real_extract(self, url): video_id = re.match(self._VALID_URL, url).group('video_id') json_data = self._download_json('https://api.caffeine.tv/social/public/activity/' + video_id, video_id) - broadcast_info = json_data['broadcast_info'] + broadcast_info = json_data.get('broadcast_info') title = broadcast_info['broadcast_title'] video_url = broadcast_info['video_url']