1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-18 00:05:46 +00:00

[caffeine.tv] Refactor info extractor

Refactor code to better reflect coding conventions
This commit is contained in:
Aaron Tan 2023-08-17 14:04:58 +10:00
parent d5f95494ed
commit 2638cab322

View file

@ -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']